From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: nljlistbox2@gmail.com (N. Jackson) Newsgroups: gmane.emacs.bugs Subject: bug#20182: 24.4.91; [GTK3] Vertical scroll bar is "indented" from right edge of frame Date: Tue, 24 Mar 2015 18:06:14 -0300 Message-ID: <87vbhqm7g9.fsf@moondust.localdomain> References: <87h9tbwnfo.fsf@moondust.localdomain> <55106F6C.7010900@gmx.at> <874mpbwglg.fsf@moondust.localdomain> <55108A2C.1010608@gmx.at> <551141A6.3050404@gmx.at> <73119439-0C7D-4A2E-BB1E-4D4B0E95E080@swipnet.se> <87619qnn8s.fsf@moondust.localdomain> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1427231243 6237 80.91.229.3 (24 Mar 2015 21:07:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Mar 2015 21:07:23 +0000 (UTC) To: 20182@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 24 22:07:13 2015 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 1YaW2a-0003q3-D3 for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Mar 2015 22:07:12 +0100 Original-Received: from localhost ([::1]:34550 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaW2Z-0003sB-D8 for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Mar 2015 17:07:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaW2V-0003s4-EP for bug-gnu-emacs@gnu.org; Tue, 24 Mar 2015 17:07:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YaW2Q-0005k8-Ax for bug-gnu-emacs@gnu.org; Tue, 24 Mar 2015 17:07:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45540) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaW2Q-0005k1-7t for bug-gnu-emacs@gnu.org; Tue, 24 Mar 2015 17:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YaW2P-0001DK-Ui for bug-gnu-emacs@gnu.org; Tue, 24 Mar 2015 17:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: nljlistbox2@gmail.com (N. Jackson) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Mar 2015 21:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20182 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20182-submit@debbugs.gnu.org id=B20182.14272311854622 (code B ref 20182); Tue, 24 Mar 2015 21:07:01 +0000 Original-Received: (at 20182) by debbugs.gnu.org; 24 Mar 2015 21:06:25 +0000 Original-Received: from localhost ([127.0.0.1]:35316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YaW1o-0001CU-VQ for submit@debbugs.gnu.org; Tue, 24 Mar 2015 17:06:25 -0400 Original-Received: from mail-qg0-f41.google.com ([209.85.192.41]:35434) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YaW1n-0001CG-7w for 20182@debbugs.gnu.org; Tue, 24 Mar 2015 17:06:23 -0400 Original-Received: by qgh3 with SMTP id 3so445288qgh.2 for <20182@debbugs.gnu.org>; Tue, 24 Mar 2015 14:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=UJLpAnpILorLL35h1LY0rbiWkEY3EAUr/iNhut/eaEs=; b=sJShYpcYijW8WFsZFrAjC/OvbzF3RFyNsTm+zlRQZ4jQKL/6HGaDdwQHqvxTcooHXH wZWwCfeONZLjcRrxDkIEPTZS5LPWhrH4ecX/uI/yZJ0JYS4wLmN0Vx4K2sBbGkBR3yWg LAp90ct27ogeWSh+yaibTJNDeCgbokcJ4jxDEzQx3E8uVNDuG5y3YsHHwOkpfX06fnsj lyhLGYrHiPCTAwysYHqC/LQZKjEoRZClZiHVlwGOtiNvqB0vo27EkctMG0zbyzMx4VXQ rPT4Ce+va+Oe7gXInyGycta7g2MAMQcNG9/hvZrgJcLY6OjF4R8PdJOVGJz942In8Uue TAHQ== X-Received: by 10.140.148.20 with SMTP id 20mr8020031qhu.67.1427231177858; Tue, 24 Mar 2015 14:06:17 -0700 (PDT) Original-Received: from moondust.localdomain.nodomain.none (blk-7-145-248.eastlink.ca. [71.7.145.248]) by mx.google.com with ESMTPSA id n52sm306137qge.39.2015.03.24.14.06.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Mar 2015 14:06:16 -0700 (PDT) In-Reply-To: <87619qnn8s.fsf@moondust.localdomain> (N. Jackson's message of "Tue, 24 Mar 2015 17:39:47 -0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.91 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:100899 Archived-At: I forgot to copy Martin on the message below (didn't reply widely enough I guess). Sorry. Also, I need to amend one thing I wrote (see below). At 17:39 -0300 on Tuesday 2015-03-24, N. Jackson wrote: > At 13:16 -0300 on Tuesday 2015-03-24, Jan D. wrote: > >>> 24 mar 2015 kl. 11:51 skrev martin rudalics : >>> >>> > 16 was the hardcoded width for Gtk2. >>> >>> Does that mean gtk_widget_style_get is broken for Gtk2? >> >> It means that the width it returns is 16. >> >>> >>> > You can #ifdef it. >>> >>> Like >>> >>> #if (! GTK_CHECK_VERSION (3, 0, 0) >>> if (w < 16) w = 16; >>> #endif >>> >> >> Yes, or >> #ifndef HAVE_GTK3 >> ... >> >> Jan D. > > Of course, if gtk_widget_style_get() only returns 16 when the GDK > version is not GDK3, then this line > > if (w < 16) w = 16; > > in update_theme_scrollbar_width() of gtkutil.c does nothing when the > GDK version is not GDK3. > > Since we don't need this adjustment with GDK3 (with which > gtk_widget_style_get() returns the correct value from the toolkit), I > replaced the offending line with > > #ifndef HAVE_GTK3 > /* if (w < 16) w = 16; */ > eassert (w == 16); > #endif > > and this seems to fix the bug for me. (Of course, removing the offending > line altogether has the same effect.) It would need to be eassert (w >= 16); ^ because of the w += 2*b; line. [In my opinion it is a terrible idea to have a variable change its semantics like this in the middle of a function -- it invitably leads to mistakes.] > I don't have a GTK2 system to test on, though. > > Note: The badness is somehow encoded in my desktop file as well, so to > see that the fix was working I had to rename my desktop file or run with > emacs --no-desktop.