From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#21317: 25.0.50; frame-resize-pixelwise has no effect (GTK, no window manager) Date: Sat, 22 Aug 2015 19:46:38 +0200 Message-ID: <55D8B57E.3010400@gmx.at> References: <55D8196B.3010206@gmx.at> <55D8844F.4080508@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1440265641 9523 80.91.229.3 (22 Aug 2015 17:47:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Aug 2015 17:47:21 +0000 (UTC) Cc: 21317@debbugs.gnu.org To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 22 19:47:10 2015 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 1ZTCsn-0005Kx-KN for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Aug 2015 19:47:09 +0200 Original-Received: from localhost ([::1]:47409 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTCsn-00085g-23 for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Aug 2015 13:47:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTCsj-000850-BN for bug-gnu-emacs@gnu.org; Sat, 22 Aug 2015 13:47:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTCsg-0004nv-5J for bug-gnu-emacs@gnu.org; Sat, 22 Aug 2015 13:47:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTCsg-0004nr-1d for bug-gnu-emacs@gnu.org; Sat, 22 Aug 2015 13:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZTCsf-0002Tp-Nf for bug-gnu-emacs@gnu.org; Sat, 22 Aug 2015 13:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Aug 2015 17:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21317 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21317-submit@debbugs.gnu.org id=B21317.14402656139519 (code B ref 21317); Sat, 22 Aug 2015 17:47:01 +0000 Original-Received: (at 21317) by debbugs.gnu.org; 22 Aug 2015 17:46:53 +0000 Original-Received: from localhost ([127.0.0.1]:35371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZTCsW-0002TT-HQ for submit@debbugs.gnu.org; Sat, 22 Aug 2015 13:46:53 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:53725) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZTCsU-0002TJ-6N for 21317@debbugs.gnu.org; Sat, 22 Aug 2015 13:46:51 -0400 Original-Received: from [91.113.7.232] ([91.113.7.232]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MZwYd-1ZBPJH0jlv-00Lj3L; Sat, 22 Aug 2015 19:46:48 +0200 In-Reply-To: X-Provags-ID: V03:K0:xiQDkNLJVbWUCFhIY++y+i0qvNQBLv1BOyowhZVvY8zBb/Qm9v7 Qewm3iUuYpz7hu9hRiJoQdiXv0NwitYbUHIlWS6HZXjf0bWiysuhAkHiCkZP1jAYrZ9bZEG oegvRd/DHL7v4heHxp3/307T4k880/HYol/aZpM2Z6Qp6VBgD5U/5LF99Gq5Fa79/sQ6kiO B4RvpuK2Pc4vW4dd5Vyxg== X-UI-Out-Filterresults: notjunk:1;V01:K0:a59WFVh6rW0=:1iAdm7R30jjlw8fwNAF1Ho 4gN3mGrjhBlfVFeD84//Q+x9PXI8DE1SCZlLImeOzsxOQQY50Y3Fxlb5obVZmq5OQMOXS5ApA 9AWGjMul/ZDYSMJnPBZWvAiVnWIEQLdnsWLWpHSZqLWKbrMT7J5Qxm68ncK8aHRCGGVYIllwy cmF41ggpeeHRKDDXp/mWr8ojcoxLHsJOj43/ugOJCYWE5PBnvl3rBSKd/i1hNhgwO2Z9eLdkg f0fckXSSyF7Xv1WIMKn5zs1jYn2qQiPF8MlUvkzpLX97+cdIQ/Zw/yDO/0oReNGh7fEmtoUms hhCabIMab9LyyB5XXPVvkRhGwJwrXtvjunzSsOUlP3a0fiZw2QdlACz3S2p4xRjXfo3H9S6/h Nuw80zqEA2cjK9JPVpa43zwt+Lv8k1h0Dml8zKS//RLzndFNwegA/h92pfOOqOalpsDdp9WjB pWZ3qimR1+8PQsjO84FSSiJVeyDl2lkgh/DOzRUKJCbOjovryXkUTtmtwI+wg90QSrrWTSIml +I7Mv+dEMOwGcxX9IVYp9qTupJp0xp/hYsKKCpoMVavIT03wwh+u8d/3Vvsu6GEQSlleKo5g0 EXVTFodOfq2fg0r5CVNzUWw4DcTUpUq/CPyF1fl+lP40Ed+oKG0+J+GJl6HsLIDfiqESrxVDN DaToeVZxXRh1teS/nM/a53Xf26tUL8AXJqgdnrLJE0RfnZn5CcSK4GFR0BC4yLp9iHmybekA5 ImUrn4tAQnp08l5pO+2ud5p7CN+r1wf32k0dyQ== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:105707 Archived-At: > Let me just repeat my initial analysis, which I still believe is > correct and which might have gotten lost somewhere. > > There are two problems: > (1) x_check_fullscreen (xterm.c) calls XResizeWindow without first > calling x_wm_set_size_hint (gtkutil.c), which would propagate the > `frame-resize-pixelwise' flag to have an effect on GTK/GDK I understand that now. You don't run do_ewmh_fullscreen. So the bug _only_ occurs when you want to make a fullscreen frame? This was not clear from you initial report. > (2) x_wm_set_size_hint returns without propagating the > `frame-resize-pixelwise' flag when the frame's fullscreen property is > 'maximized or 'fullboth. > > The first appears to be simple oversight, but the second is > intentional to work around a KWin bug. I faintly remember that bug now. What I don't understand is the remedy. When we do fs_state = Fframe_parameter (frame, Qfullscreen); if (EQ (fs_state, Qmaximized) || EQ (fs_state, Qfullboth)) the parameter has been already set but the frame is not yet fullscreen. Does this shrinking occur when the frame is already fullscreen or does it occur when a user wants to switch to fullscreen? > I've attached a patch which fixes things for me (at least when > tool-bar-mode is disabled :( ), but presumably breaks things for KWin > users, so it should not go in as it is until that matter has been > cleared; maybe that'll help clarify matters. When worse comes to worse we could condition that somehow: Invent an option which is off by default and call x_wm_set_size_hint when it's on. > We do hit that code (in gtkutil.c) twice: once during early > initialization, when frame_resize_pixelwise is still false, and once > after GDK has decided to resize us to not-quite-full-screen size, when > it's too late. We should hit it once more, from x_check_fullscreen, > but don't do so for the two reasons listed above. I see. If in frame.c you initialize frame_resize_pixelwise to 1 then everything works OK? >> Can you check how apparently an "integral" (the increment is a multiple >> of either FRAME_COLUMN_WIDTH or FRAME_LINE_HEIGHT) value gets passed via >> size_hints in your case? > > Oh, I see what you mean now. I'll investigate that next. Not necessary. It won't help anyway. >>>> So it's possible that Xnest or some other X component refuses to resize >>>> your frame because the size hints were set up inappropriately. >>> >>> I'm pretty sure that's not what's happening, but I'll be happy to >>> provide traces to demonstrate my analysis is correct...or to prove it >>> wrong, of course! The attached gdb log shows quite clearly that it's >>> GDK making the second (erroneous) call to XResizeWindow, not Xnest >>> (there is no window manager). >> >> OK. I won't doubt what you say here. > > Feel free to, of course, though I understand sifting through gdb logs > is best avoided unless it's absolutely necessary. Well... I didn't understand the problem at that time. >>>> Does it also fail when `frame-resize-pixelwise' is set to t in your >>>> initial file? >>> >>> Yes, it does. >> >> That's bad. It can only mean that we send an integral resize request >> _before_ Emacs reads the initial file and the subsequent "real" resize >> request fails because the size hints have been already set up wrongly. > > No, we call Fsetq and so on fine, I think it's just that we never call > x_set_wm_size_hints afterwards. We could invent a function `set-frame-resize-pixelwise' which sends the size hints (maybe iff when a frame is not fullscreen, or so to avoid the KWin bug). > It appears to ignore the fullscreen resize; as you point out, that's > as expected, by the "don't resize twice without a redisplay" rule. It's rather a don't resize and change the fullscreen status without a redisplay. >> However, in >> xg_frame_set_char_size (which is responsible for the resize in the GTK >> case) we could do the > > That's a very interesting point, because xg_frame_set_char_size never > appears to get called here after early initialization. Instead, we > call XResizeWindow directly, then GDK catches the ConfigureNotify and > decides it doesn't like it, so it sends another (erroneous) > XResizeWindow. Interesting indeed. Something's not right here, I'm afraid. I'll have to look into this. martin