unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Anders Lindgren <andlind@gmail.com>, 23320@debbugs.gnu.org
Subject: bug#23320: 25.0.92; Window width not updated after frame resize (Win32 and GTK)
Date: Wed, 20 Apr 2016 15:49:16 +0200	[thread overview]
Message-ID: <571788DC.20001@gmx.at> (raw)
In-Reply-To: <CABr8ebbAUivQZaik+WpX6CZDuVRs5ck1EFnrB3JtPjZykxn=Kw@mail.gmail.com>

 > I noticed a regression on 25.0.92 compared to 24.5 where the following code
 > behaves differently on the w32 port. (On a recent GTK build it also
 > misbehaves, but not under the NS port.)
 >
 >      (progn
 >        (set-frame-size (selected-frame) 1000 400 t)
 >        (window-width nil t))
 >
 > On 24.5, this evaluates to "1000". However, on 25.0.92 `window-width'
 > returns the width prior to the frame resize. (Evaluating it a second time
 > returns 1000, though.)
 >
 > Adding `(sit-for 0)' before the call to `window-width' make is return 1000
 > the first time, but it doesn't feel like a robust solution.
 >
 > Is this the expected behavior? If it is, is adding `(sit-for 0)' the
 > recommended way to get the correct window width after a frame resize?

Thanks for the report.  Just in due time to fix this for the release.
Moreover it allows me to remember the purpose of a change (something I
was unable to do in the discussion of bug#21380).  You can find the gory
details here:

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21380

The corresponding commit is:

commit 8af8355c3f72500986f6f10b62714b228d6f35ee
Author: Martin Rudalics <rudalics@gmx.at>
Date:   Mon Aug 31 11:09:22 2015 +0200

     Don't call do_pending_window_change in signal handlers (Bug#21380)

     * src/gtkutil.c (xg_frame_resized):
     * src/xterm.c (x_set_window_size):
     * src/w32term.c (x_set_window_size): Don't call
     do_pending_window_change.

which should also explain why the NS port was not affected.

I'm not sure how to proceed.  Probably I'll have to revert that commit
but the consequences are pretty unclear at the moment (at least to me).

martin





  reply	other threads:[~2016-04-20 13:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20  9:16 bug#23320: 25.0.92; Window width not updated after frame resize (Win32 and GTK) Anders Lindgren
2016-04-20 13:49 ` martin rudalics [this message]
2016-04-20 15:06   ` Eli Zaretskii
2016-04-21  9:15     ` martin rudalics
2016-04-21 14:19       ` Eli Zaretskii
2016-04-22 10:10         ` martin rudalics
2016-04-21 10:07   ` YAMAMOTO Mitsuharu
2016-04-22 10:10     ` martin rudalics
2016-04-22 10:10 ` martin rudalics
2016-07-01  6:13   ` 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

  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=571788DC.20001@gmx.at \
    --to=rudalics@gmx.at \
    --cc=23320@debbugs.gnu.org \
    --cc=andlind@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).