From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eugen Dedu Newsgroups: gmane.emacs.bugs Subject: bug#20619: Scrollbars Date: Tue, 27 Dec 2016 23:45:24 +0100 Message-ID: References: <555CD05C.4070303@stsci.edu> <932ffe0b-8e9e-5a47-1a3f-47df43f7be42@univ-fcomte.fr> <83h95tzrne.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1482878781 29480 195.159.176.226 (27 Dec 2016 22:46:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Dec 2016 22:46:21 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.5.1 Cc: 20619@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 27 23:46:14 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cM0VT-00067b-Ip for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Dec 2016 23:46:07 +0100 Original-Received: from localhost ([::1]:56548 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cM0VY-0004n5-E5 for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Dec 2016 17:46:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cM0VR-0004mp-TK for bug-gnu-emacs@gnu.org; Tue, 27 Dec 2016 17:46:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cM0VO-0002Ka-Pb for bug-gnu-emacs@gnu.org; Tue, 27 Dec 2016 17:46:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41953) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cM0VO-0002KV-MD for bug-gnu-emacs@gnu.org; Tue, 27 Dec 2016 17:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cM0VO-0007uJ-Dz for bug-gnu-emacs@gnu.org; Tue, 27 Dec 2016 17:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eugen Dedu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Dec 2016 22:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20619 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20619-submit@debbugs.gnu.org id=B20619.148287873930364 (code B ref 20619); Tue, 27 Dec 2016 22:46:02 +0000 Original-Received: (at 20619) by debbugs.gnu.org; 27 Dec 2016 22:45:39 +0000 Original-Received: from localhost ([127.0.0.1]:57352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cM0V1-0007tg-DX for submit@debbugs.gnu.org; Tue, 27 Dec 2016 17:45:39 -0500 Original-Received: from ufc-sortie.univ-fcomte.fr ([194.57.91.199]:48104) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cM0Uz-0007tP-0u for 20619@debbugs.gnu.org; Tue, 27 Dec 2016 17:45:38 -0500 Original-Received: from ufc204.univ-fcomte.fr (ufc204.univ-fcomte.fr [194.57.91.204]) by ufc-sortie.univ-fcomte.fr (Postfix) with ESMTP id 927C3600A0; Tue, 27 Dec 2016 23:45:30 +0100 (CET) Original-Received: from smtps.univ-fcomte.fr (localhost.localdomain [127.0.0.1]) by ufc204.univ-fcomte.fr (Postfix) with ESMTP id 2F60420301F9; Tue, 27 Dec 2016 23:45:30 +0100 (CET) In-Reply-To: <83h95tzrne.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:127509 Archived-At: On 24/12/16 08:56, Eli Zaretskii wrote: >> From: Eugen Dedu >> Date: Fri, 23 Dec 2016 21:30:17 +0100 >> >> Now, to advance emacs support for HIDPI I would like to fix the >> scrollbar. Do all people here agree that the scrollbar has a width >> twice as normal? The reason is that in src/gtkutil.c there is this code: >> >> int >> xg_get_default_scrollbar_width (void) >> { >> return scroll_bar_width_for_theme * xg_get_gdk_scale (); >> } >> >> where xg_get_gdk_scale returns GDK_SCALE variable, i.e. 2 in general. >> >> If I replace with: >> return scroll_bar_width_for_theme; >> the scrollbar is shown correctly. >> >> This change was made by >> https://github.com/emacs-mirror/emacs/commit/c0055ff5b03c9121ab5bf752496b09416f0f0a7d. >> I think there was an error there, or perhaps in the mean time (since >> May 2015) GTK has changed in a way so that scrollbars are taken into >> account. > > What is your version of GTK? That commit points to a bug report > (bug#20432), so this change is not a mistake, it did fix a real > problem with scroll bars. We could make it conditional on the GTK > version, though. The bug report mentions a specific GTK version. I use gtk 3.22.5. To reproduce the exact environment when that commit was made, I pulled the repository at the commit right before that change and compiled it. I had one compile error that I fixed with an #undef, and another one: make[1]: *** [bootstrap-emacs] Segmentation fault which I have not tried to fix. >> Note that GDK_DPI_SCALE is only for font, AFAIU from >> https://developer.gnome.org/gtk3/stable/gtk-x11.html. > > The code you mention doesn't use GDK_DPI_SCALE. Indeed. I wrote this because in the bug 20432 which the commit fixed it was mentioned GDK_DPI_SCALE too. >> What do you think? Would you commit such a modification? > > I don't think we can simply revert the change in question, but maybe > we could use different code based on GTK version. If I make an #ifdef with gtk 3.22, is that fine to do the commit? Everyone can test with a gtk-enabled emacs simply using "GDK_SCALE=2 emacs". >> I would like to look into other issues as well. > > Thank you! I see bugs 20432, 21469, and 18429 that might be relevant. I have looked at them, but I think the right thing to do is just to fix using conditionals, things have changed in the last 1-1.5 years (when those bugs were written) it seems. -- Eugen