GNU bug report logs - #35059
window-setup-hook not working with the new frame parameters

Previous Next

Package: emacs;

Reported by: JohnMichaelWu <at> gmail.com

Date: Sun, 31 Mar 2019 07:18:02 UTC

Severity: normal

Tags: notabug

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


Message #15 received at control <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Michael Wu <john.michael.wu <at> gmail.com>, JohnMichaelWu <at> gmail.com,
 35059 <at> debbugs.gnu.org
Subject: Re: bug#35059: window-setup-hook not working with the new frame
 parameters
Date: Tue, 18 Aug 2020 16:50:19 +0000
tags 35059 + notabug
close 35059
thanks

Eli Zaretskii <eliz <at> gnu.org> writes:

> On March 31, 2019 8:57:18 AM GMT+03:00, Michael Wu <john.michael.wu <at> 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




This bug report was last modified 4 years and 356 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.