GNU bug report logs - #8505
24.0.50; frame grows horizontally if scroll-bar-mode is non-nil

Previous Next

Package: emacs;

Reported by: Daiki Ueno <ueno <at> unixuser.org>

Date: Fri, 15 Apr 2011 06:46:02 UTC

Severity: normal

Found in version 24.0.50

Done: Jan Djärv <jan.h.d <at> swipnet.se>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8505 in the body.
You can then email your comments to 8505 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8505; Package emacs. (Fri, 15 Apr 2011 06:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daiki Ueno <ueno <at> unixuser.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 15 Apr 2011 06:46:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daiki Ueno <ueno <at> unixuser.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.50; frame grows horizontally if scroll-bar-mode is non-nil
Date: Fri, 15 Apr 2011 15:35:28 +0900
If I build emacs with ./configure --with-x-toolkit=gtk3 and start it
with emacs -Q, the width of the Emacs window is growing with the lapse
of time.

If I build emacs with ./configure --with-x-toolkit=gtk (not gtk3), or
run emacs -Q --eval '(scroll-bar-mode -1)', the problem does not occur.


In GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.0.8)
 of 2011-04-15 on localhost.localdomain
Windowing system distributor `Fedora Project', version 11.0.11000000
configured using `configure  '--enable-maintainer-mode' '--with-x-toolkit=gtk3' 'CFLAGS=-Wall -g -O0''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Group

Minor modes in effect:
  gnus-topic-mode: t
  gnus-undo-mode: t
  which-function-mode: t
  recentf-mode: t
  iswitchb-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<return> y L C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p <escape> g <help-echo> <down-mouse-1> <mouse-movement> 
<mouse-1> <escape> x r e p o r t SPC e m a <tab> <
return>

Recent messages:
No more unread newsgroups
No Gnus is good news

Load-path shadows:
~/.emacs.d/custom hides /usr/local/share/emacs/24.0.50/lisp/custom
~/.emacs.d/socks hides /usr/local/share/emacs/24.0.50/lisp/net/socks

Features:
(shadow sort gnus-cite flyspell ispell mail-extr emacsbug url-util
url-parse url-vars rot13 disp-table gnus-topic nndraft nnmh epa-file epa
derived epg utf-7 rfc2104 auth-source eieio byte-opt bytecomp
byte-compile cconv assoc network-stream starttls nnimap parse-time tls
utf7 netrc nnnil gnus-agent gnus-srvr gnus-score score-mode nnvirtual
gnus-msg gnus-art mm-uu mml2015 epg-config mm-view mml-smime smime
password-cache dig mailcap nntp gnus-cache nnir gnus-sum macroexp
gnus-group gnus-undo nnmail mail-source nnoo gnus-start gnus-spec
gnus-int gnus-range message sendmail regexp-opt format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems
nnheader gnus-util time-date mail-utils mm-util mail-prsvr uniquify
advice help-fns advice-preload deal which-func imenu recentf tree-widget
wid-edit easymenu iswitchb cus-start cus-load tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer loaddefs button faces cus-face files text-properties
overlay md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8505; Package emacs. (Fri, 15 Apr 2011 09:33:02 GMT) Full text and rfc822 format available.

Message #8 received at 8505 <at> debbugs.gnu.org (full text, mbox):

From: Daiki Ueno <ueno <at> unixuser.org>
To: 8505 <at> debbugs.gnu.org
Subject: Re: bug#8505: 24.0.50;
	frame grows horizontally if scroll-bar-mode is non-nil
Date: Fri, 15 Apr 2011 18:31:52 +0900
Daiki Ueno <ueno <at> unixuser.org> writes:

> If I build emacs with ./configure --with-x-toolkit=gtk3 and start it
> with emacs -Q, the width of the Emacs window is growing with the lapse
> of time.

Perhaps my explanation might be unclear - here is a trace from GDB.

(gdb) b xg_frame_resized 
Breakpoint 3 at 0x531eca: file gtkutil.c, line 849.
(gdb) commands 3
Type commands for breakpoint(s) 3, one per line.
End with a line saying just "end".
>continue
>end
(gdb) run -Q
...

Breakpoint 3, xg_frame_resized (f=0x10e2c40, pixelwidth=688, pixelheight=578)
    at gtkutil.c:849
849	  if (pixelwidth == -1 && pixelheight == -1)

Breakpoint 3, xg_frame_resized (f=0x10e2c40, pixelwidth=694, pixelheight=578)
    at gtkutil.c:849
849	  if (pixelwidth == -1 && pixelheight == -1)

Breakpoint 3, xg_frame_resized (f=0x10e2c40, pixelwidth=696, pixelheight=578)
    at gtkutil.c:849
849	  if (pixelwidth == -1 && pixelheight == -1)

Breakpoint 3, xg_frame_resized (f=0x10e2c40, pixelwidth=702, pixelheight=578)
    at gtkutil.c:849
849	  if (pixelwidth == -1 && pixelheight == -1)

Breakpoint 3, xg_frame_resized (f=0x10e2c40, pixelwidth=704, pixelheight=578)
    at gtkutil.c:849
849	  if (pixelwidth == -1 && pixelheight == -1)
...




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8505; Package emacs. (Fri, 03 Jun 2011 09:39:02 GMT) Full text and rfc822 format available.

Message #11 received at 8505 <at> debbugs.gnu.org (full text, mbox):

From: Daiki Ueno <ueno <at> unixuser.org>
To: 8505 <at> debbugs.gnu.org
Cc: Jan Djärv <jan.h.d <at> swipnet.se>
Subject: Re: bug#8505: 24.0.50;
	frame grows horizontally if scroll-bar-mode is non-nil
Date: Fri, 03 Jun 2011 18:38:35 +0900
(Cc'ed Jan)

Daiki Ueno <ueno <at> unixuser.org> writes:

> If I build emacs with ./configure --with-x-toolkit=gtk3 and start it
> with emacs -Q, the width of the Emacs window is growing with the lapse
> of time.

OK, I finally got it.  This can be reproduced only with specific gtk-3.0
themes (including GNOME3 default), where some widget properties have
larger values than Emacs expects.

Currently Emacs expects the scrollbar width at most 16 pixels.

xfns.c:104442:

 void
 x_set_scroll_bar_default_width (struct frame *f)
 {
   int wid = FRAME_COLUMN_WIDTH (f);

 #ifdef USE_TOOLKIT_SCROLL_BARS
   /* A minimum width of 14 doesn't look good for toolkit scroll bars.  */
   int width = 16 + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM;

However, gnome-themes-standard wants to render scrollbars in 22-pixel width.

http://git.gnome.org/browse/gnome-themes-standard/tree/themes/Adwaita/gtk-3.0/gtk-widgets.css#n511

 .scrollbar {
     background-image: none;
     border-style: solid;
     -GtkRange-trough-border: 2;
     -GtkRange-arrow-scaling: 0.444;
     -GtkRange-slider-width: 18;
     -GtkRange-stepper-size: 18;

22 pixels = slider-width(18) + trough-border(2) * 2

I confirmed that my problem is fixed if I increase the default width to
22.

Since it happens with GNOME3 default theme, I would appreciate if it
will be fixed before the pretest, though I don't know how easy to let
Emacs to take account of GTK theme properties.

Regards,
-- 
Daiki Ueno




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8505; Package emacs. (Fri, 03 Jun 2011 16:46:02 GMT) Full text and rfc822 format available.

Message #14 received at 8505 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Daiki Ueno <ueno <at> unixuser.org>
Cc: 8505 <at> debbugs.gnu.org
Subject: Re: bug#8505: 24.0.50; frame grows horizontally if scroll-bar-mode
	is non-nil
Date: Fri, 03 Jun 2011 18:45:19 +0200
Hello.

Thanks for debugging this.  I couldn't see it as I use Gtk3 without Gnome 3.
I have a fix for this, but savannah has problems right now.  I will check it 
in when savannah sorts itself out.

	Jan D.


Daiki Ueno skrev 2011-06-03 11.38:
> (Cc'ed Jan)
>
> Daiki Ueno<ueno <at> unixuser.org>  writes:
>
>> If I build emacs with ./configure --with-x-toolkit=gtk3 and start it
>> with emacs -Q, the width of the Emacs window is growing with the lapse
>> of time.
>
> OK, I finally got it.  This can be reproduced only with specific gtk-3.0
> themes (including GNOME3 default), where some widget properties have
> larger values than Emacs expects.
>
> Currently Emacs expects the scrollbar width at most 16 pixels.
>
> xfns.c:104442:
>
>   void
>   x_set_scroll_bar_default_width (struct frame *f)
>   {
>     int wid = FRAME_COLUMN_WIDTH (f);
>
>   #ifdef USE_TOOLKIT_SCROLL_BARS
>     /* A minimum width of 14 doesn't look good for toolkit scroll bars.  */
>     int width = 16 + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM;
>
> However, gnome-themes-standard wants to render scrollbars in 22-pixel width.
>
> http://git.gnome.org/browse/gnome-themes-standard/tree/themes/Adwaita/gtk-3.0/gtk-widgets.css#n511
>
>   .scrollbar {
>       background-image: none;
>       border-style: solid;
>       -GtkRange-trough-border: 2;
>       -GtkRange-arrow-scaling: 0.444;
>       -GtkRange-slider-width: 18;
>       -GtkRange-stepper-size: 18;
>
> 22 pixels = slider-width(18) + trough-border(2) * 2
>
> I confirmed that my problem is fixed if I increase the default width to
> 22.
>
> Since it happens with GNOME3 default theme, I would appreciate if it
> will be fixed before the pretest, though I don't know how easy to let
> Emacs to take account of GTK theme properties.
>
> Regards,




Reply sent to Jan Djärv <jan.h.d <at> swipnet.se>:
You have taken responsibility. (Sun, 05 Jun 2011 19:09:02 GMT) Full text and rfc822 format available.

Notification sent to Daiki Ueno <ueno <at> unixuser.org>:
bug acknowledged by developer. (Sun, 05 Jun 2011 19:09:02 GMT) Full text and rfc822 format available.

Message #19 received at 8505-done <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Daiki Ueno <ueno <at> unixuser.org>
Cc: 8505-done <at> debbugs.gnu.org
Subject: Re: bug#8505: 24.0.50; frame grows horizontally if scroll-bar-mode
	is non-nil
Date: Sun, 05 Jun 2011 21:08:29 +0200
Hello.

I've checked in a fix.  But it occured to me that the wrong thing will happen 
if the theme is changed while Emacs runs, and the theme changed to has the 
wider scroll bar.  Can you change theme in Gnome 3?

	Jan D.


Daiki Ueno skrev 2011-06-03 11.38:
> (Cc'ed Jan)
>
> Daiki Ueno<ueno <at> unixuser.org>  writes:
>
>> If I build emacs with ./configure --with-x-toolkit=gtk3 and start it
>> with emacs -Q, the width of the Emacs window is growing with the lapse
>> of time.
>
> OK, I finally got it.  This can be reproduced only with specific gtk-3.0
> themes (including GNOME3 default), where some widget properties have
> larger values than Emacs expects.
>
> Currently Emacs expects the scrollbar width at most 16 pixels.
>
> xfns.c:104442:
>
>   void
>   x_set_scroll_bar_default_width (struct frame *f)
>   {
>     int wid = FRAME_COLUMN_WIDTH (f);
>
>   #ifdef USE_TOOLKIT_SCROLL_BARS
>     /* A minimum width of 14 doesn't look good for toolkit scroll bars.  */
>     int width = 16 + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM;
>
> However, gnome-themes-standard wants to render scrollbars in 22-pixel width.
>
> http://git.gnome.org/browse/gnome-themes-standard/tree/themes/Adwaita/gtk-3.0/gtk-widgets.css#n511
>
>   .scrollbar {
>       background-image: none;
>       border-style: solid;
>       -GtkRange-trough-border: 2;
>       -GtkRange-arrow-scaling: 0.444;
>       -GtkRange-slider-width: 18;
>       -GtkRange-stepper-size: 18;
>
> 22 pixels = slider-width(18) + trough-border(2) * 2
>
> I confirmed that my problem is fixed if I increase the default width to
> 22.
>
> Since it happens with GNOME3 default theme, I would appreciate if it
> will be fixed before the pretest, though I don't know how easy to let
> Emacs to take account of GTK theme properties.
>
> Regards,




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8505; Package emacs. (Mon, 06 Jun 2011 01:24:02 GMT) Full text and rfc822 format available.

Message #22 received at 8505 <at> debbugs.gnu.org (full text, mbox):

From: Daiki Ueno <ueno <at> unixuser.org>
To: jan.h.d <at> swipnet.se
Cc: 8505 <at> debbugs.gnu.org
Subject: Re: bug#8505: 24.0.50;
	frame grows horizontally if scroll-bar-mode is non-nil
Date: Mon, 06 Jun 2011 10:23:14 +0900
Jan Djärv <jan.h.d <at> swipnet.se> writes:

> I've checked in a fix.  But it occured to me that the wrong thing will
> happen if the theme is changed while Emacs runs, and the theme changed
> to has the wider scroll bar.  Can you change theme in Gnome 3?

Thanks for the quick fix - it now normally starts up.  However, yes, if
I start it with "HighContrast" theme and change it to "Adwaita" (by
using gnome-tweak-tool), the wrong thing happens again.

Also, I noticed that I can no longer shrink the window horizontally by
dragging the scrollbar from right to left - it only grows regardless of
dragging direction.

Regards,
-- 
Daiki Ueno




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8505; Package emacs. (Mon, 06 Jun 2011 07:46:01 GMT) Full text and rfc822 format available.

Message #25 received at 8505 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Daiki Ueno <ueno <at> unixuser.org>
Cc: 8505 <at> debbugs.gnu.org
Subject: Re: bug#8505: 24.0.50; frame grows horizontally if scroll-bar-mode
	is non-nil
Date: Mon, 06 Jun 2011 09:45:25 +0200

Daiki Ueno skrev 2011-06-06 03.23:
> Jan Djärv<jan.h.d <at> swipnet.se>  writes:
>
>> I've checked in a fix.  But it occured to me that the wrong thing will
>> happen if the theme is changed while Emacs runs, and the theme changed
>> to has the wider scroll bar.  Can you change theme in Gnome 3?
>
> Thanks for the quick fix - it now normally starts up.  However, yes, if
> I start it with "HighContrast" theme and change it to "Adwaita" (by
> using gnome-tweak-tool), the wrong thing happens again.
>

I suspected that.  I'll get gnome-tweak-tool and try to fix it.  It might take 
a while if we have to add dconf-support, but hopefully Gtk+ is enough.

> Also, I noticed that I can no longer shrink the window horizontally by
> dragging the scrollbar from right to left - it only grows regardless of
> dragging direction.
>

:-)  That was unexpected.

	Jan D.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8505; Package emacs. (Tue, 14 Jun 2011 21:14:02 GMT) Full text and rfc822 format available.

Message #28 received at 8505 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Daiki Ueno <ueno <at> unixuser.org>
Cc: 8505 <at> debbugs.gnu.org
Subject: Re: bug#8505: 24.0.50; frame grows horizontally if scroll-bar-mode
	is non-nil
Date: Tue, 14 Jun 2011 23:13:36 +0200
Hello.

I've checked in fixes for these issues.
Gtk3 has a new sizing policy in place that totally breaks GtkFixed w.r.t. 
resize.  GtkFixed is what Emacs uses so we suffered from all the bugs.
The theme change is also fixed.  Please test it.

Thanks,

	Jan D.



Daiki Ueno skrev 2011-06-06 03.23:
> Jan Djärv<jan.h.d <at> swipnet.se>  writes:
>
>> I've checked in a fix.  But it occured to me that the wrong thing will
>> happen if the theme is changed while Emacs runs, and the theme changed
>> to has the wider scroll bar.  Can you change theme in Gnome 3?
>
> Thanks for the quick fix - it now normally starts up.  However, yes, if
> I start it with "HighContrast" theme and change it to "Adwaita" (by
> using gnome-tweak-tool), the wrong thing happens again.
>
> Also, I noticed that I can no longer shrink the window horizontally by
> dragging the scrollbar from right to left - it only grows regardless of
> dragging direction.
>
> Regards,




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8505; Package emacs. (Wed, 15 Jun 2011 01:42:02 GMT) Full text and rfc822 format available.

Message #31 received at 8505 <at> debbugs.gnu.org (full text, mbox):

From: Daiki Ueno <ueno <at> unixuser.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 8505 <at> debbugs.gnu.org
Subject: Re: bug#8505: 24.0.50;
	frame grows horizontally if scroll-bar-mode  is non-nil
Date: Wed, 15 Jun 2011 10:41:25 +0900
Jan Djärv <jan.h.d <at> swipnet.se> writes:

> I've checked in fixes for these issues.
> Gtk3 has a new sizing policy in place that totally breaks GtkFixed
> w.r.t. resize.  GtkFixed is what Emacs uses so we suffered from all
> the bugs.
> The theme change is also fixed.  Please test it.

Thanks for the fix.  I confirmed that now everything works fine; I can
safely change the theme and resize the window by dragging mouse.

Regards,
-- 
Daiki Ueno




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 13 Jul 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 297 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.