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: Sun, 23 Aug 2015 15:10:53 +0200 Message-ID: <55D9C65D.1010201@gmx.at> References: <55D8196B.3010206@gmx.at> <55D8844F.4080508@gmx.at> <55D8B57E.3010400@gmx.at> <55D9AA9D.9030807@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1440336208 22485 80.91.229.3 (23 Aug 2015 13:23:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Aug 2015 13:23:28 +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 Sun Aug 23 15:23:18 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 1ZTVF0-0008AQ-Am for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Aug 2015 15:23:18 +0200 Original-Received: from localhost ([::1]:41349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTVBB-0007Ru-EM for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Aug 2015 09:19:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTV49-00082m-KG for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2015 09:12:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTV46-0002wl-0i for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2015 09:12:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTV45-0002wh-UU for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2015 09:12:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZTV45-0008Kx-LJ for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2015 09:12: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: Sun, 23 Aug 2015 13:12: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.144033547031989 (code B ref 21317); Sun, 23 Aug 2015 13:12:01 +0000 Original-Received: (at 21317) by debbugs.gnu.org; 23 Aug 2015 13:11:10 +0000 Original-Received: from localhost ([127.0.0.1]:35669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZTV3G-0008Js-2h for submit@debbugs.gnu.org; Sun, 23 Aug 2015 09:11:10 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:65309) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZTV3D-0008Ji-Dt for 21317@debbugs.gnu.org; Sun, 23 Aug 2015 09:11:08 -0400 Original-Received: from [188.22.42.120] ([188.22.42.120]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MHH6Z-1ZYE0Y3FXH-00E1hm; Sun, 23 Aug 2015 15:11:05 +0200 In-Reply-To: X-Provags-ID: V03:K0:0DDjLK/hANcUy2YhW4sE3/sZ3O09l7ueLGaMPH5lnKVQnWNImnC 47AX400/5+W/MGmlBfQlUMgIWlVp1iiYNi+pzzsBSphI6jP5fNkIA9K8hlt0pLX41vq7zrM DAYDYPGdIKyD9aNrzHdr4HpteYGRJK8xDHZuz9M/DeiDSHodCl8CEWeOAqk3OtlffQqPEDb FhkKTAsjaMkIHZD9uUCoA== X-UI-Out-Filterresults: notjunk:1;V01:K0:HA6S9dlB9KQ=:CnZjAqCH5EdKtxTp3PSuM0 AAC7oo98HN2Fm/4BeRX+erTb+RM9So4SzmvirqE/gtyjMgqE5vOZiTiX0YS7Zqf8dAopUGiRz X+4smwDXcUGmO4/ZHd6O+3v1/OzGZ9jmN5FTsXsxXyzFrs828XqkNtnfdwjgA1bgzgPbRd/Jb li0hwAH5I/zzAu9a/hvWxSpqiFRebpeWrg0UF5LO268ntFyUKxllnq4fCSAGYyEhp4jHt1qIn qPNq2d4Ftljb2YxIee9pRoUINRGJj/B1os5qdUatbN2754e7V7E7J2gCKkmA9C5wHei9lwVZH yr6h8/ei6QJIA5haKbvxbxz4bYcs4LHdpx8CBbgoqIGIbFT+3Nwokm8M/iJ33xZdxPGB5Lt6y u7wlcsjcmRdmtrRY5AwZhOg3yrJ49a5KYKPPkIMKeK7iyNVm1G4mJ5IZDHZmteTD1Z4/B9b9+ nErHRrkiYhw7ykNiwXoaodin9AfokTULf1omGKuvjDoiFol+Q22v+IcfZPNVtwNfbGekG6P0K aMd3qJyTedRuHy65GIDfcsBnJARDOKM7CI/8rKf46S+P0o618NpFms6pSSLChI8HHYQxpVz9b iLvzrmdeu0Alp0YzH+cSxSyoLWT2C+JPjcZ3TsEctv0QnM8Ja+qsMJN+4+u+YafvFnzyx/OU/ F42GdyWiEgRJO8zxe8ir/b56EgqsTrTcUkAdu3TdUmix9ulrWBB8GQlQQT/G9NWdF/LIvp7N2 MWwdMCprIeODc/wiV5MnC/AtMrp2DPZoyUwlfA== 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:105726 Archived-At: >> Do I understand finally? x_net_wm_state resets the fullscreen state to >> nil via its store_frame_param? That would be the missing link then. > > Indeed. Aha. > (Minor point of confusion here: there are two functions called > `x_net_wm_state' and `x_handle_net_wm_state' which appear to do the > same thing...) The other one handles the sticky value. I've no idea whether it's useful, though. > The problem appears with all of maximized, fullheight, fullwidth, and fullboth. Because in all of these cases setting the size hint is suppressed and/or the parameter is reset. This is quite a mess. >> So when you try to increase the height of a normal frame by one pixel, >> which is the resize operation you send? > > set_frame_height calls adjust_frame_size which calls x_set_window_size > which calls xg_frame_set_char_size. > x_set_window_size_1 is NOT being called in this case. Aha. >> I suppose it's the last one >> from x_set_window_size_1 so Emacs correctly passes the size hint with >> frame_resize_pixelwise 1. Right? > > No, x_set_window_size_1 never is called here. Obviously. > It's the last case in xg_frame_set_char_size, which calls > gtk_window_resize FIRST, then calls x_wm_set_size_hints. I do not > understand why that works, but it appears to. (Is this another bug? > I'm seriously confused at this point). I too. But I already mentioned that in my second mail ;-) >> If this is the case, then Emacs should, for you, also handle fullwidth >> and fullheight requests correctly via the first and second of the >> requests in x_set_window_size_1. Right? > > No. x_set_window_size_1 isn't called at all. xg_frame_set_char_size > isn't called for fullscreen requests at all. OK >> So the two remaining cases Emacs can't handle for you are fullscreen and >> maximized requests. Right? > > No, it's all four fullscreen settings. OK >>> I do wonder how useful it is to support the case without a window >>> manager; unfortunately, I think it is useful, much as I'd enjoy all >>> that code going away and leaving things to the window manager. >> >> I miss you here: Which "case" do you mean? > > I was considering whether it might be best to remove the > no-window-manager code entirely, but I don't think we should. IIRC we earlier never asked a window manager and emulated the fullscreen stuff ourselves. Currently we still emulate fullheight and fullwidth on Windows for example. >>> If my understanding is correct, the best way forward is this: >>> >>> - skip the hints in maximized/fullscreen state if >>> wm_supports(net_wm_state) || wm_supports(net_wm_state_fullscreen), it >>> might be KWin >>> - otherwise, set the hints >> >> OK. These can be done easily, maybe in combination with my patch. > > I think your patch actually solves that problem: if there's no WM, > get_current_wm_state will always return FULLSCREEN_NONE, ... via is_hidden ... > so we set the > size hints appropriately. Hopefully. So let me summarize what's needed: (1) x_check_fullscreen has to call x_wm_set_size_hint before it calls x_wm_set_size_hint. (2) x_wm_set_size_hint should set the increments as long as the window is not fullscreen-something. (3) x_check_fullscreen has to restore the fullscreen frame parameter mangled by x_net_wm_state. (4) (Possibly unrelated) xg_frame_set_char_size should call x_wm_set_size_hint before calling gtk_window_resize. If you come up with a patch for (1)-(3) I'll install it and we can see what kind of breakage it gets us. --- I see you've done that already. --- We can do (4) later. martin