unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Dirk Ullrich <dirk.ullrich@googlemail.com>
Cc: 8919@debbugs.gnu.org
Subject: bug#8919: 24.0.50; Ever-changing frame size for GTK3 toolkit on a KDE4 desktop
Date: Sun, 26 Jun 2011 17:36:16 +0200	[thread overview]
Message-ID: <4E0751F0.7080004@swipnet.se> (raw)
In-Reply-To: <4E046DBD.1040609@swipnet.se>



Jan Djärv 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 built
>> 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 = ((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 used, and 
that is what Gtk3 (and 2) uses.

But Gtk3 sets min size by itself now, ignoring any min size set by Emacs (a 
gigantic bug IMHO).  But Gtk3 doesn't bother to adjust min width so it is 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 formula 
above that the width should be 378 pixels so it, being the window manager, 
resizes the frame to that.  Gtk3 then sees that the frame has been resized, 
and rather than just accepting the size like any well behaved toolkit should 
do, it resizes again, now to 672 (width_inc is 8 here).  And KDE then resizes 
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 new min 
width/height, and the dance is on again.


This is so ugly, so maybe Emacs should remove Gtk3 support for this release?

There doesn't seem to be any sane way around this, except rewriting Gtk3+ 
widgets to not set any min size other that the one the application has set.

	Jan D.





  reply	other threads:[~2011-06-26 15:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22 11:04 bug#8919: 24.0.50; Ever-changing frame size for GTK3 toolkit on a KDE4 desktop Dirk Ullrich
2011-06-23 17:48 ` Jan Djärv
2011-06-24  9:47   ` Dirk Ullrich
2011-06-24 10:58     ` Jan Djärv
2011-06-26 15:36       ` Jan Djärv [this message]
2011-06-26 18:51         ` Jan Djärv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E0751F0.7080004@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=8919@debbugs.gnu.org \
    --cc=dirk.ullrich@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).