From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: asjo@koldfront.dk (Adam =?UTF-8?Q?Sj=C3=B8gren?=) Newsgroups: gmane.emacs.bugs Subject: bug#1036: [PATCH] * xterm.c (gtk-scroll-bar-adjust-thumb-portion): New variable to determine whether gtk scroll bar thumb size should be adjusted or not. * gtkutil.c (gtk-scroll-bar-adjust-thumb-portion): Use variable. Date: Sun, 02 Dec 2012 14:07:06 +0100 Organization: koldfront - analysis & revolution, Copenhagen, Denmark Message-ID: <878v9geh6t.fsf@topper.koldfront.dk> References: <08F7728F-7C66-4679-B905-E548DDA0E0FA@Freenet.DE> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1354453679 16757 80.91.229.3 (2 Dec 2012 13:07:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Dec 2012 13:07:59 +0000 (UTC) To: 1036@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 02 14:08:08 2012 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 1Tf9HE-0003vp-2k for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Dec 2012 14:08:08 +0100 Original-Received: from localhost ([::1]:51513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tf9H2-0001vh-5u for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Dec 2012 08:07:56 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tf9Gv-0001vT-RR for bug-gnu-emacs@gnu.org; Sun, 02 Dec 2012 08:07:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tf9Gr-0002vU-EN for bug-gnu-emacs@gnu.org; Sun, 02 Dec 2012 08:07:49 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tf9Gr-0002up-AX for bug-gnu-emacs@gnu.org; Sun, 02 Dec 2012 08:07:45 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tf9J3-00075n-LL for bug-gnu-emacs@gnu.org; Sun, 02 Dec 2012 08:10:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <08F7728F-7C66-4679-B905-E548DDA0E0FA@Freenet.DE> Resent-From: asjo@koldfront.dk (Adam =?UTF-8?Q?Sj=C3=B8gren?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Dec 2012 13:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1036 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 1036-submit@debbugs.gnu.org id=B1036.135445377427224 (code B ref 1036); Sun, 02 Dec 2012 13:10:01 +0000 Original-Received: (at 1036) by debbugs.gnu.org; 2 Dec 2012 13:09:34 +0000 Original-Received: from localhost ([127.0.0.1]:49371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tf9IX-00074z-TM for submit@debbugs.gnu.org; Sun, 02 Dec 2012 08:09:34 -0500 Original-Received: from 2505ds5-by.0.fullrate.dk ([89.150.142.116]:45426 helo=topper.koldfront.dk) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tf9IS-00074p-0k for 1036@debbugs.gnu.org; Sun, 02 Dec 2012 08:09:28 -0500 Original-Received: by topper.koldfront.dk (Postfix, from userid 1000) id 5BA4A50FA6F5; Sun, 2 Dec 2012 14:07:06 +0100 (CET) X-Hashcash: 1:21:121202:1036@debbugs.gnu.org::YUSw1GFBMhPyz8+O:0000000000000000000000000000000000000000013os OpenPGP: id=21BDE416; url=http://asjo.koldfront.dk/gpg.asc X-Now-Playing: 127.0.0.1 X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97, Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR 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:67778 Archived-At: Seeing that there is no correct solution in sight, maybe it would be possible to solve the problem like this. Summary of problem and links to discussions in the previous decade, see here: http://koldfront.dk/archive/2012/05/27-181826.html --- src/ChangeLog | 7 +++++++ src/gtkutil.c | 18 +++++++++++------- src/xterm.c | 10 ++++++++++ 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 80b9b1e..b95cf17 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2012-12-02 Adam Sj=F8gren + + * xterm.c (gtk-scroll-bar-adjust-thumb-portion): New variable to + determine whether gtk scroll bar thumb size should be adjusted or + not (Bug#1036). + * gtkutil.c (gtk-scroll-bar-adjust-thumb-portion): Use variable. + 2012-12-01 Paul Eggert =20 * xterm.c (x_draw_image_relief): Remove unused locals (Bug#10500). diff --git a/src/gtkutil.c b/src/gtkutil.c index 4367b53..5259fe7 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -3765,13 +3765,17 @@ xg_set_toolkit_scroll_bar_thumb (struct scroll_bar = *bar, =20 adj =3D gtk_range_get_adjustment (GTK_RANGE (wscroll)); =20 - /* We do the same as for MOTIF in xterm.c, assume 30 chars per line - rather than the real portion value. This makes the thumb less li= kely - to resize and that looks better. */ - portion =3D WINDOW_TOTAL_LINES (XWINDOW (bar->window)) * 30; - /* When the thumb is at the bottom, position =3D=3D whole. - So we need to increase `whole' to make space for the thumb. */ - whole +=3D portion; + if (gtk_scroll_bar_adjust_thumb_portion_p) + { + /* We do the same as for MOTIF in xterm.c, use 30 chars per + line rather than the real portion value. This makes the + thumb less likely to resize and that looks better. */ + portion =3D WINDOW_TOTAL_LINES (XWINDOW (bar->window)) * 30; + + /* When the thumb is at the bottom, position =3D=3D whole. + So we need to increase `whole' to make space for the thumb. = */ + whole +=3D portion; + } =20 if (whole <=3D 0) top =3D 0, shown =3D 1; diff --git a/src/xterm.c b/src/xterm.c index bbcff8c..64f069d 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -10791,6 +10791,16 @@ With MS Windows or Nextstep, the value is t. */); Vx_toolkit_scroll_bars =3D Qnil; #endif =20 +#ifdef USE_GTK + DEFVAR_BOOL ("gtk-scroll-bar-adjust-thumb-portion", + gtk_scroll_bar_adjust_thumb_portion_p, + doc: /* Non-nil means adjust the thumb in the +gtk scroll bar to be less likely to resize which looks better. +Set to nil if you want the thumb to fill the whole scroll bar +when the entire buffer is visible. */); + gtk_scroll_bar_adjust_thumb_portion_p =3D 1; +#endif + staticpro (&last_mouse_motion_frame); last_mouse_motion_frame =3D Qnil; =20 --=20 1.7.10.4 --=20 "It's beautiful! And I certainly hope Adam Sj=F8gren my parents hate this album!" asjo@koldfront.dk