unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: JohnMichaelWu@gmail.com, Michael Wu <john.michael.wu@gmail.com>,
	35059@debbugs.gnu.org
Subject: bug#35059: window-setup-hook not working with the new frame parameters
Date: Tue, 18 Aug 2020 16:50:19 +0000	[thread overview]
Message-ID: <CADwFkmkZkCyGHGmt2O1w1eh-4ssqV=_czhC8ZqXyYOUu=nk+8g@mail.gmail.com> (raw)
In-Reply-To: <25CD59D4-2351-4781-85B7-1C31EF309C99@gnu.org> (Eli Zaretskii's message of "Sun, 31 Mar 2019 11:20:35 +0300")

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	other threads:[~2020-08-18 16:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-31  5:57 bug#35059: window-setup-hook not working with the new frame parameters Michael Wu
2019-03-31  8:20 ` Eli Zaretskii
2020-08-18 16:50   ` Stefan Kangas [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CADwFkmkZkCyGHGmt2O1w1eh-4ssqV=_czhC8ZqXyYOUu=nk+8g@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=35059@debbugs.gnu.org \
    --cc=JohnMichaelWu@gmail.com \
    --cc=eliz@gnu.org \
    --cc=john.michael.wu@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).