bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#35059: window-setup-hook not working with the new frame parameters


From: Stefan Kangas
Subject: bug#35059: window-setup-hook not working with the new frame parameters
Date: Tue, 18 Aug 2020 16:50:19 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

tags 35059 + notabug
close 35059
thanks

Eli Zaretskii <eliz@gnu.org> writes:

> On March 31, 2019 8:57:18 AM GMT+03:00, Michael Wu 
> <john.michael.wu@gmail.com> wrote:
>> See this StackOverflow thread:
>> https://emacs.stackexchange.com/questions/48645/if-start-with-maximized-frame-why-do-windows-open-top-bottom-not-side-by-side
>>
>> as well as Stefan's answer, and comments on that answer. Essentially,
>> I
>> do not believe window-setup-hook is properly running after all frame
>> parameters have been set, as is suggested in the documentation here:
>>
>> https://www.gnu.org/software/emacs/manual/html_node/elisp/Startup-Summary.html
>
>
> There's nothing wrong with window-setup-hook, AFAICT, it indeed runs after 
> all the parameters of the frame have been set according to your 
> customizations.
>
> The problem is in your apparent assumption that frame maximization happens
> immediately after you put the fullscreen parameter into frame-parametets.  But
> actually, frame maximization is performed through interaction with the
> window-manager, which generally happens asynchronously and takes some short, 
> but
> non-zero time.
>
> Add to your hook  a call to 'message' that displays the width and height of 
> the selected window, and you will see why you get windows split vertically.
>
> The conclusion is that if you want to see windows split like you expected, 
> you need to insert a wait into your  emacs.  Or just split horizontally by an 
> explicit command.

No further updates within more than a year, so I'm closing this bug
report with the above explanation.

If this conclusion is incorrect, please reply to this email (use "Reply
to all" in your email client) and we can reopen the bug report.

Best regards,
Stefan Kangas





reply via email to

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