[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25511: 26.0.50; modify-frame-parameters modifies undesignated parame

From: martin rudalics
Subject: bug#25511: 26.0.50; modify-frame-parameters modifies undesignated parameter?
Date: Mon, 23 Jan 2017 09:03:35 +0100

> 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.

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

> 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.

> [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"?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]