From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs Subject: bug#8919: 24.0.50; Ever-changing frame size for GTK3 toolkit on a KDE4 desktop Date: Sun, 26 Jun 2011 20:51:13 +0200 Message-ID: <4E077FA1.1020906@swipnet.se> References: <4E037C6A.9010807@swipnet.se> <4E046DBD.1040609@swipnet.se> <4E0751F0.7080004@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1309114347 21182 80.91.229.12 (26 Jun 2011 18:52:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 26 Jun 2011 18:52:27 +0000 (UTC) Cc: 8919-done@debbugs.gnu.org To: Dirk Ullrich Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 26 20:52:23 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QauRS-0008Hc-4r for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Jun 2011 20:52:22 +0200 Original-Received: from localhost ([::1]:55230 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QauRR-00031H-Cq for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Jun 2011 14:52:21 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:40853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QauRB-000319-1w for bug-gnu-emacs@gnu.org; Sun, 26 Jun 2011 14:52:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QauR9-0006M0-Gs for bug-gnu-emacs@gnu.org; Sun, 26 Jun 2011 14:52:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QauR9-0006Ls-Dk for bug-gnu-emacs@gnu.org; Sun, 26 Jun 2011 14:52:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QauR8-0005O0-Rm for bug-gnu-emacs@gnu.org; Sun, 26 Jun 2011 14:52:02 -0400 Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Jun 2011 18:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 8919 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 8919@debbugs.gnu.org, jan.h.d@swipnet.se Original-Received: via spool by 8919-done@debbugs.gnu.org id=D8919.130911428320652 (code D ref 8919); Sun, 26 Jun 2011 18:52:02 +0000 Original-Received: (at 8919-done) by debbugs.gnu.org; 26 Jun 2011 18:51:23 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QauQV-0005N3-7b for submit@debbugs.gnu.org; Sun, 26 Jun 2011 14:51:23 -0400 Original-Received: from smtprelay-h21.telenor.se ([195.54.99.196]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QauQS-0005Mq-68 for 8919-done@debbugs.gnu.org; Sun, 26 Jun 2011 14:51:21 -0400 Original-Received: from ipb1.telenor.se (ipb1.telenor.se [195.54.127.164]) by smtprelay-h21.telenor.se (Postfix) with ESMTP id 40938E9CC0 for <8919-done@debbugs.gnu.org>; Sun, 26 Jun 2011 20:51:14 +0200 (CEST) X-SENDER-IP: [85.225.45.100] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmdZAPJ+B05V4S1kPGdsb2JhbABSiRGeNQsBAQEBNzKIdr9phjAElnGLLw X-IronPort-AV: E=Sophos;i="4.65,428,1304287200"; d="scan'208";a="203059947" Original-Received: from c-642de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.100]) by ipb1.telenor.se with ESMTP; 26 Jun 2011 20:51:13 +0200 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id 3F30A7FA05A; Sun, 26 Jun 2011 20:51:13 +0200 (CEST) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.18) Gecko/20110613 Thunderbird/3.1.11 In-Reply-To: <4E0751F0.7080004@swipnet.se> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 26 Jun 2011 14:52:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:47511 Archived-At: Hello. I've checked in a really ugly solution (overriding X11 functions). This = only=20 applies to Gtk3. Maybe we should do like Firefox and only use Gtk for th= e=20 style specific drawing, thus bypassing all the strange behaviour. No tim= e for=20 that before feature freeze, though. Jan D. Jan Dj=E4rv skrev 2011-06-26 17.36: > > > Jan Dj=E4rv skrev 2011-06-24 12.58: >> >> >> Dirk Ullrich skrev 2011-06-24 11.47: >> >>> I must confess that this the first time that I suffer from this >>> shrinking of Emacs on KDE. (I use the Emacs' development version buil= t >>> for the GTK2 toolkit right from the beginning.) Maybe that the bug >>> occured for an Emacs revision I didn't build. And for GTK2 it even >>> doesn't happen at all yet - at least for me. >>> >>> By the way - for curiousity I reverted to revision 104583 i.e. the >>> last one for your last GTK3-related changes. For this revision the >>> shrinking error does not occur. >> >> Hi. >> >> This is not surprising, it is a timing issue. >> > > Actually its not a timing issue. KDE uses min_width/height to calculate > geometry constraints, i.e. a window shall obey > > width =3D ((width - min_width)/width_inc) * width_inc + min_width > > Ditto for height. This is OK if min_width is a multiple of width_inc. > > That may be seen as a bug in it self as base_size is what should be use= d, and > that is what Gtk3 (and 2) uses. > > But Gtk3 sets min size by itself now, ignoring any min size set by Emac= s (a > gigantic bug IMHO). But Gtk3 doesn't bother to adjust min width so it i= s a > multiple of width_inc (ditto for height). This is another bug. > > And in the style that Gtk+/Gnome is developed in ("we know best"), Gtk+ > actually resizes the frame after the window manager has resized it (bug= #3). > That is so Gtk+ can force its "we know best" view of what the size the = frame > shall have according to Gtk+, never mind that Emacs, the window manager= and > the user has another view. > > So in my case we set width to 680 pixel. But KDE calculates with the fo= rmula > above that the width should be 378 pixels so it, being the window manag= er, > resizes the frame to that. Gtk3 then sees that the frame has been resiz= ed, and > rather than just accepting the size like any well behaved toolkit shoul= d do, > it resizes again, now to 672 (width_inc is 8 here). And KDE then resize= s to > 370. And Gtk+ to 664. And KDE to 662. And so on. With luck they find a = common > denominator, or otherwise the frame gets resized until it hits the min = width. > > If you move/hide the scroll bar, or menu bar or tool bar, Gtk+ sets a n= ew min > width/height, and the dance is on again. > > > This is so ugly, so maybe Emacs should remove Gtk3 support for this rel= ease? > > There doesn't seem to be any sane way around this, except rewriting Gtk= 3+ > widgets to not set any min size other that the one the application has = set. > > Jan D.