all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: martin rudalics <rudalics@gmx.at>
Cc: 25511@debbugs.gnu.org
Subject: bug#25511: 26.0.50; modify-frame-parameters modifies undesignated parameter?
Date: Mon, 23 Jan 2017 18:01:06 +0900	[thread overview]
Message-ID: <b4mmveiywtp.fsf@jpl.org> (raw)
In-Reply-To: <b4mefzu1bh8.fsf@jpl.org>

On Mon, 23 Jan 2017 09:03:35 +0100, martin rudalics wrote:
>> The coordinates start with (0 0) and (256 1080) respectively[1].
>> In that situation, the following script makes a new frame protrude
>> to the left from the down screen:
>>
>> (let ((frame (make-frame)))
>>    (modify-frame-parameters frame '((top . 1200))))

> Why don't you use

> (make-frame '((top . 1200)))

> in the first place?  This should tell the window manager right away what
> position you want before making the frame visible.  If this does not
> work as intended, we shall have to investigate it.

Yes, it and even (make-frame) work with no problem.

> As a general rule: Never set a frame parameter right after creating a
> new frame.

Ok, I can modify some codes similar to it.

>> On the new frame, (frame-parameter nil 'left) returns 8, that is
>> outside of the down screen.  This happens whichever the original
>> frame (that runs the script) exists in the up screen or the down
>> screen.  As mentioned above, a new frame did not protrude from
>> the down screen last week.  Here is a workaround:
>>
>> (let ((frame (make-frame)))
>>    (sit-for 0)
>>    (modify-frame-parameters frame '((top . 1200))))
>>
>> But it is needless, isn't it?

> IIUC your approach worked because of a busy loop in x_make_frame_visible
> which has been removed a few days ago.  I back its removal so you should
> be able to do without it.

I found the change in question in git log after sending the
report.  I don't ask you to revert it as it seems to have been
a burden sort of.

>> [1] The values of left and top frame parameters seem to indicate
>>      that of a window of an Emacs frame, so we have to increase
>>      the values some extent.

> I'm not sure I can follow you here.  The `top' and `left' frame
> parameters usually indicate the top/left position of the window manager
> frame that has reparented the outermost widget of your Emacs frame.
> What do you have to "increase"?

In order not to hide the matte that includes the title bar, the
menu bar, and the tool bar.  In reality on Cygwin, the form

(make-frame '((left . 0) (top . 0)))

doesn't work as expected; the new frame appears on the down
screen and the position is erratic.  The minimum values that
display a new frame fully on the top-left corner of the upper
screen is:

(make-frame '((left . 0) (top . 1)))

But frame-parameters shows left=8 and top=32 in that case.

Anyway thanks for your help.  I will close this bug later.

Regards,





  reply	other threads:[~2017-01-23  9:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23  7:28 bug#25511: 26.0.50; modify-frame-parameters modifies undesignated parameter? Katsumi Yamaoka
2017-01-23  8:03 ` martin rudalics
2017-01-23  9:01   ` Katsumi Yamaoka [this message]
2017-01-23 10:28     ` martin rudalics
2017-01-23 22:54       ` Katsumi Yamaoka
2017-01-24  0:45         ` Katsumi Yamaoka
2017-01-24  7:46           ` martin rudalics
2017-01-24  9:18             ` Katsumi Yamaoka
2017-01-24  9:37               ` martin rudalics
2017-06-05 12:57                 ` npostavs
2017-06-05 13:36                   ` martin rudalics
2017-06-06  0:00                     ` npostavs
2017-06-06  6:38                       ` martin rudalics
2017-01-24  7:46         ` martin rudalics
2017-01-23 17:27   ` Noam Postavsky
2017-01-23 18:01     ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4mmveiywtp.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=25511@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.