From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23320: 25.0.92; Window width not updated after frame resize (Win32 and GTK) Date: Wed, 20 Apr 2016 18:06:38 +0300 Message-ID: <83potk720x.fsf@gnu.org> References: <571788DC.20001@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1461164847 19705 80.91.229.3 (20 Apr 2016 15:07:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Apr 2016 15:07:27 +0000 (UTC) Cc: 23320@debbugs.gnu.org, andlind@gmail.com To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 20 17:07:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1astim-0004GF-1m for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Apr 2016 17:07:16 +0200 Original-Received: from localhost ([::1]:51037 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1astil-00084O-8e for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Apr 2016 11:07:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1astie-0007th-62 for bug-gnu-emacs@gnu.org; Wed, 20 Apr 2016 11:07:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1astiY-0003Al-2V for bug-gnu-emacs@gnu.org; Wed, 20 Apr 2016 11:07:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1astiX-0003Ah-VK for bug-gnu-emacs@gnu.org; Wed, 20 Apr 2016 11:07:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1astiX-0006kC-RS for bug-gnu-emacs@gnu.org; Wed, 20 Apr 2016 11:07:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Apr 2016 15:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23320 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23320-submit@debbugs.gnu.org id=B23320.146116481825914 (code B ref 23320); Wed, 20 Apr 2016 15:07:01 +0000 Original-Received: (at 23320) by debbugs.gnu.org; 20 Apr 2016 15:06:58 +0000 Original-Received: from localhost ([127.0.0.1]:41544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1astiU-0006ju-2f for submit@debbugs.gnu.org; Wed, 20 Apr 2016 11:06:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54371) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1astiR-0006jL-T6 for 23320@debbugs.gnu.org; Wed, 20 Apr 2016 11:06:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1astiI-00037j-8k for 23320@debbugs.gnu.org; Wed, 20 Apr 2016 11:06:50 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46001) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1astiI-00037c-5M; Wed, 20 Apr 2016 11:06:46 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3389 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1astiH-0002ch-9i; Wed, 20 Apr 2016 11:06:45 -0400 In-reply-to: <571788DC.20001@gmx.at> (message from martin rudalics on Wed, 20 Apr 2016 15:49:16 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:116631 Archived-At: > Date: Wed, 20 Apr 2016 15:49:16 +0200 > From: martin rudalics > > > 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 > 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). Isn't it true that expecting the frame dimensions change immediately is unreliable? If so, there's no bug here.