all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#8505: 24.0.50; frame grows horizontally if scroll-bar-mode is non-nil
@ 2011-04-15  6:35 Daiki Ueno
  2011-04-15  9:31 ` Daiki Ueno
  2011-06-03  9:38 ` Daiki Ueno
  0 siblings, 2 replies; 9+ messages in thread
From: Daiki Ueno @ 2011-04-15  6:35 UTC (permalink / raw)
  To: 8505

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)





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#8505: 24.0.50; frame grows horizontally if scroll-bar-mode is non-nil
  2011-04-15  6:35 bug#8505: 24.0.50; frame grows horizontally if scroll-bar-mode is non-nil Daiki Ueno
@ 2011-04-15  9:31 ` Daiki Ueno
  2011-06-03  9:38 ` Daiki Ueno
  1 sibling, 0 replies; 9+ messages in thread
From: Daiki Ueno @ 2011-04-15  9:31 UTC (permalink / raw)
  To: 8505

Daiki Ueno <ueno@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)
...





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#8505: 24.0.50; frame grows horizontally if scroll-bar-mode is non-nil
  2011-04-15  6:35 bug#8505: 24.0.50; frame grows horizontally if scroll-bar-mode is non-nil Daiki Ueno
  2011-04-15  9:31 ` Daiki Ueno
@ 2011-06-03  9:38 ` Daiki Ueno
  2011-06-03 16:45   ` Jan Djärv
  2011-06-05 19:08   ` Jan Djärv
  1 sibling, 2 replies; 9+ messages in thread
From: Daiki Ueno @ 2011-06-03  9:38 UTC (permalink / raw)
  To: 8505

(Cc'ed Jan)

Daiki Ueno <ueno@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#8505: 24.0.50; frame grows horizontally if scroll-bar-mode is non-nil
  2011-06-03  9:38 ` Daiki Ueno
@ 2011-06-03 16:45   ` Jan Djärv
  2011-06-05 19:08   ` Jan Djärv
  1 sibling, 0 replies; 9+ messages in thread
From: Jan Djärv @ 2011-06-03 16:45 UTC (permalink / raw)
  To: Daiki Ueno; +Cc: 8505

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@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,





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#8505: 24.0.50; frame grows horizontally if scroll-bar-mode is non-nil
  2011-06-03  9:38 ` Daiki Ueno
  2011-06-03 16:45   ` Jan Djärv
@ 2011-06-05 19:08   ` Jan Djärv
  2011-06-06  1:23     ` Daiki Ueno
  1 sibling, 1 reply; 9+ messages in thread
From: Jan Djärv @ 2011-06-05 19:08 UTC (permalink / raw)
  To: Daiki Ueno; +Cc: 8505-done

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@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,





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#8505: 24.0.50; frame grows horizontally if scroll-bar-mode is non-nil
  2011-06-05 19:08   ` Jan Djärv
@ 2011-06-06  1:23     ` Daiki Ueno
  2011-06-06  7:45       ` Jan Djärv
  2011-06-14 21:13       ` Jan Djärv
  0 siblings, 2 replies; 9+ messages in thread
From: Daiki Ueno @ 2011-06-06  1:23 UTC (permalink / raw)
  To: jan.h.d; +Cc: 8505

Jan Djärv <jan.h.d@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#8505: 24.0.50; frame grows horizontally if scroll-bar-mode is non-nil
  2011-06-06  1:23     ` Daiki Ueno
@ 2011-06-06  7:45       ` Jan Djärv
  2011-06-14 21:13       ` Jan Djärv
  1 sibling, 0 replies; 9+ messages in thread
From: Jan Djärv @ 2011-06-06  7:45 UTC (permalink / raw)
  To: Daiki Ueno; +Cc: 8505



Daiki Ueno skrev 2011-06-06 03.23:
> Jan Djärv<jan.h.d@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.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#8505: 24.0.50; frame grows horizontally if scroll-bar-mode is non-nil
  2011-06-06  1:23     ` Daiki Ueno
  2011-06-06  7:45       ` Jan Djärv
@ 2011-06-14 21:13       ` Jan Djärv
  2011-06-15  1:41         ` Daiki Ueno
  1 sibling, 1 reply; 9+ messages in thread
From: Jan Djärv @ 2011-06-14 21:13 UTC (permalink / raw)
  To: Daiki Ueno; +Cc: 8505

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@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,





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#8505: 24.0.50; frame grows horizontally if scroll-bar-mode  is non-nil
  2011-06-14 21:13       ` Jan Djärv
@ 2011-06-15  1:41         ` Daiki Ueno
  0 siblings, 0 replies; 9+ messages in thread
From: Daiki Ueno @ 2011-06-15  1:41 UTC (permalink / raw)
  To: Jan Djärv; +Cc: 8505

Jan Djärv <jan.h.d@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-06-15  1:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-15  6:35 bug#8505: 24.0.50; frame grows horizontally if scroll-bar-mode is non-nil Daiki Ueno
2011-04-15  9:31 ` Daiki Ueno
2011-06-03  9:38 ` Daiki Ueno
2011-06-03 16:45   ` Jan Djärv
2011-06-05 19:08   ` Jan Djärv
2011-06-06  1:23     ` Daiki Ueno
2011-06-06  7:45       ` Jan Djärv
2011-06-14 21:13       ` Jan Djärv
2011-06-15  1:41         ` Daiki Ueno

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.