From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.bugs Subject: bug#19990: 24.4; Bad resizing interaction when WM ignores size hints Date: Thu, 05 Mar 2015 17:36:07 +0100 Message-ID: <54F885F7.80803@swipnet.se> References: <54F59D19.5000808@eurac.edu> <54F5F3C9.9070008@gmx.at> <54F6003E.7040900@eurac.edu> <54F752C8.7050009@gmx.at> <54F754A4.5050507@eurac.edu> <8D5FE96A-F0AE-4908-8AEF-DFDBAB504983@swipnet.se> <54F80E26.1070608@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1425573474 10278 80.91.229.3 (5 Mar 2015 16:37:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Mar 2015 16:37:54 +0000 (UTC) Cc: 19990@debbugs.gnu.org To: martin rudalics , Yuri D'Elia Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 05 17:37:43 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 1YTYlt-0001xq-CS for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Mar 2015 17:37:13 +0100 Original-Received: from localhost ([::1]:52844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTYls-0002Jg-Id for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Mar 2015 11:37:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTYlo-0002Ho-Fd for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2015 11:37:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTYli-0006fG-Cz for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2015 11:37:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTYli-0006fC-3u for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2015 11:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YTYlh-0005wU-Sm for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2015 11:37:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Jan D." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Mar 2015 16:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19990 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19990-submit@debbugs.gnu.org id=B19990.142557337922779 (code B ref 19990); Thu, 05 Mar 2015 16:37:01 +0000 Original-Received: (at 19990) by debbugs.gnu.org; 5 Mar 2015 16:36:19 +0000 Original-Received: from localhost ([127.0.0.1]:36167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YTYl0-0005vK-T2 for submit@debbugs.gnu.org; Thu, 05 Mar 2015 11:36:19 -0500 Original-Received: from mailfe09.swip.net ([212.247.155.1]:43251 helo=swip.net) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YTYky-0005v6-PR for 19990@debbugs.gnu.org; Thu, 05 Mar 2015 11:36:18 -0500 X-T2-Spam-Status: No, hits=0.8 required=5.0 tests=BAYES_50 Original-Received: from hosdjarv.se (account mj138573@tele2.se [46.59.42.57] verified) by mailfe09.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 404914883; Thu, 05 Mar 2015 17:36:09 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 In-Reply-To: <54F80E26.1070608@gmx.at> 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: 140.186.70.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:100093 Archived-At: martin rudalics skrev den 2015-03-05 09:04: > > Gtk+ does have code that tries to resize a window if it did not get > the size it requested. > > How does it do that? It keeps track of what resize it has done, and when the ConfigureNotify event arrives, it checks to see if it matches its constraints. See code in Gtk+, gtkwindow.c (it is a mess). > Why does a first resize with an odd size > apparently get through at all? Why shouldn't it? > Can't Gtk+ intercept thet first request? > And how comes that Gtk+ is apparently not able to intercept the focus in > reqest in the same way? What do you mean by intercept? Intercept from who? > > BTW, I never understood the following two comments in gtkutil.c: > > /* Must use GTK routines here, otherwise GTK resets the size hints > to its own defaults. */ > > and > > /* Don't set hints when maximized or fullscreen. Apparently KWin > and > Gtk3 don't get along and the frame shrinks (!). > > How could that possibly work? Fine so far. The hints specify things like resize increments which are the character size, i.e. you can only resize one full row at the time (at least when that comment was made). If you have a fullscreen frame, and the font changes, in principle the hints should change. But a change leads to a war between KWin and Gtk+ regarding who shall control the size of the frame. So we don't change hints, we leave the old in place. Gtk+ has its own copy of hints, which it sets by itself from time to time, and which it tries to enforce. If we where to set hints with X functions, Gtk+ would try to enforce something it has, while the window manager would enforce what we actually set. So we use Gtk+ routines sp that Gtk+ and the window manager have the same hints. These to comments are not really related to each other. > According to the first comment when we > "don't set hints when maximized or fullscreen" we get "otherwise GTK > resets the size hints to its own defaults". I.e. make sure the window manager and Gtk+ have the same hints, but don't change them when fullscreen because Gtk+ and KWin implements enforcements of hints differently. Gtk+ and the window manager still has our last non-fullscreen hints. Jan D.