From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ola Nilsson Newsgroups: gmane.emacs.bugs Subject: bug#28605: 26.0.60; Part of leftmost character hidden Date: Tue, 3 Oct 2017 14:12:26 +0200 Message-ID: References: <59CB5D69.7040404@gmx.at> <59CE05F2.1010202@gmx.at> <59CE8E74.5010308@gmx.at> <59D35549.6030905@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1507032815 6540 195.159.176.226 (3 Oct 2017 12:13:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 3 Oct 2017 12:13:35 +0000 (UTC) Cc: Lars Magne Ingebrigtsen , 28605@debbugs.gnu.org, Kaushal To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 03 14:13:20 2017 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 1dzM4c-00087O-Iq for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Oct 2017 14:13:18 +0200 Original-Received: from localhost ([::1]:58290 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzM4e-000157-VB for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Oct 2017 08:13:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzM4S-00012X-0c for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 08:13:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzM4M-00027R-Oh for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 08:13:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36671) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dzM4M-00026q-JR for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 08:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dzM4M-0007U8-53 for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 08:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ola Nilsson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Oct 2017 12:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28605 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28605-submit@debbugs.gnu.org id=B28605.150703276228744 (code B ref 28605); Tue, 03 Oct 2017 12:13:02 +0000 Original-Received: (at 28605) by debbugs.gnu.org; 3 Oct 2017 12:12:42 +0000 Original-Received: from localhost ([127.0.0.1]:45351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzM3z-0007TV-4p for submit@debbugs.gnu.org; Tue, 03 Oct 2017 08:12:42 -0400 Original-Received: from mail-oi0-f54.google.com ([209.85.218.54]:44275) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzM3s-0007T1-DC for 28605@debbugs.gnu.org; Tue, 03 Oct 2017 08:12:36 -0400 Original-Received: by mail-oi0-f54.google.com with SMTP id s145so8100658oie.1 for <28605@debbugs.gnu.org>; Tue, 03 Oct 2017 05:12:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=nK5jtSFsFhey5Oy0JplgU9CUMuDsSEzrMmFlRS81WCc=; b=cUv6cTfqXs+Gj+Dv4BWhjXCyRgVS8xBmUO2zTvOqeN+8EI4eDUSQzzdDKW4tKShTZh nAtOeeItboX5anrP9pANIMc2ZRtqqVQzdUHHMa4srFIH0q0AhnHhggUnMnNRz0At9il1 VR3WEeo3y5TZxl2p6nphH1PNgLq3Aj/1z03A/YmsCMlKNj2cb4fHrYkBjJEf9XW9a+ok 6wi+wetyvW3yhvJ/HgCNyaZ9eogW6O+YEAnTU7HnR7vW2b5o3dWD3rrfIvfhdUwTvASF NLIYu/lm+F4cs7+Cw5fwZxx4rXsMlt+bn4yxZld0KkDpX4mJ4gOvP+oBcvuT8NAe0T4I f2iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=nK5jtSFsFhey5Oy0JplgU9CUMuDsSEzrMmFlRS81WCc=; b=d6G+tNG6jEsEKRy4Dxb2fkvat4ma2eAWkct8PzTLtRHvtgxgN8UfGjvhklzOmHpske kgSxVRNAu+KVIS4oUbk6ROhNIU+Xfd6YnLhiMCZGatIAVDVQtbtlhrM9vpZfS/o+2Zld UxUUw41kzf0n7w5VGU+iWkWdEN058mS97FnarOGz/5ujCUKsUPhBjrC8kChNr1g0Nf++ oXix6J/4ljTjixKi9i3nmn3MwJ4ELhtuIreWH1Ws+8h7NThKPpvY7g34YpTZGnKjETGT 8ThH+p+w5rIPCAW1/BCYVZcTJ432hzyPxFNyY91dJO4mAYy5myG2WxQBZkmNMQ8kSkgM 8fCA== X-Gm-Message-State: AMCzsaUHvIvvOPQO+KaavcDSXZaCUrH+He0cve5YPMkas7Yb2msV6Lxk shsK9QXeSA3T9YjWmK6SlSj+oQe+g27JIvtasmQ= X-Google-Smtp-Source: AOwi7QDjtQvUi2r155p2jfzyaTUVNygCRrv68z2yK4OXpySvI8D0VvLwGphwvumK6GppA7ZhOTiydR2WVMaSSp/7/Rg= X-Received: by 10.202.244.145 with SMTP id s139mr7764393oih.24.1507032746641; Tue, 03 Oct 2017 05:12:26 -0700 (PDT) Original-Received: by 10.168.167.136 with HTTP; Tue, 3 Oct 2017 05:12:26 -0700 (PDT) In-Reply-To: <59D35549.6030905@gmx.at> 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:137821 Archived-At: On Tue, Oct 3, 2017 at 11:15 AM, martin rudalics wrote: >> If the frame contains three side-by-side windows and scroll bars on >> the right I expect to see (from left to right): >> >> frame border >> left fringe for window one >> window one >> right fringe for window one >> scroll bar for window one >> right fringe for window two >> window two >> left fringe for window two >> scroll bar for window two >> right fringe for window three >> window three >> left fringe for window three >> scroll bar for window three >> frame border >> >> Of all the fringes, only the left fringe of window one is visible. >> Using scroll bars on the left, only the right fringe of window three >> is visible. >> In both cases, characters that are next to non-visible/hidden fringes >> are partially hidden. >> I'm attaching two screenshots that should show this. > > Thanks for the details. From your initial screenshot it was not clear > to me that the effect is really that bad. > >> I bit the bullet and did a git bisect: >> >> 36cf0791ba75ee16dfbedfe437567ec6dd945b8a is the first bad commit >> commit 36cf0791ba75ee16dfbedfe437567ec6dd945b8a >> Author: Lars Ingebrigtsen >> Date: Sun Jul 16 16:50:57 2017 +0200 >> Remove usage of the GDK_SCALE variable >> >> * src/gtkutil.c (xg_get_gdk_scale): Remove. >> (xg_get_default_scrollbar_height) >> (xg_get_default_scrollbar_width): Pass in a frame to check for >> scaling. >> (xg_frame_set_char_size): Use the API for querying scale >> instead of looking at the GDK_SCALE variable. >> (xg_get_default_scrollbar_width): Ditto. >> (xg_get_default_scrollbar_height): Ditto. >> (xg_update_scrollbar_pos): Ditto. >> >> * src/xfns.c (x_set_scroll_bar_default_height): Pass in the >> frame to get the width. > > Great. Lars, how should we proceed from here? > > (1) Revert that commit. > > (2) Revert the call of gtk_widget_get_scale_factor only. > > (3) Try to fix the build with your change in place. > > (4) Provide some option so that users can either use your approach or > Jan's. The default should prefer Jan's setup to avoid that users > like Ola have to go through this again. > >> I also played with the dividers and horizontal scroll bars. >> >> The horizontal scroll bars are not visibla at all with scaling on. > > Apparently, the horizontal scroll bar code does not handle scaling. If > we fix the current problem, maybe you could help me fix that one too. > >> Dividers on the right fixed the hidden character problem but not the >> hidden fringes, > > Yes. IMHO it's because the scroll bar clearing code hides the dividers > instead of the text. If you customize dividers to a sufficiently large > width you should be able to make the entire text visible and even parts > of the dividers (on the left side of a window, only - the right sides > will remain obscured as before). > >> I attach some screenshots of this as well. > > Very informative, thanks. One thing that stupefies me about these > screenshots is that the menu and toolbar items are smaller in > horizontal-scrollbars-no-dividers.png than in with-hidpi-scaling.png. > >> This is with emacs -Q --no-x-resources, dividers off, horizontal >> scrollbars off. >> >> frame pixel: 2034 x 466 cols/lines: 226 x 25 units: 9 x 18 > [...] >> height header-line: 0 mode-line: 0 divider: 0 > > All these values are completely as expected so the problem must be > confined to this x_clear_area call in xg_update_scrollbar_pos in > gtkutil.c > > /* Clear under old scroll bar position. */ > oldw += (scale - 1) * oldw; > oldx -= (scale - 1) * oldw; > x_clear_area (f, oldx, oldy, oldw, oldh); > > where the value of scale is now obtained via > > int scale = xg_get_scale (f); > > If you replace the latter by the old > > int scale = xg_get_gdk_scale (); > > does your problem go away? If so, then it would be interesting how the > values returned by xg_get_scale differ with gtk_widget_get_scale_factor > and xg_get_gdk_scale called. Made no difference what I can see, except a lot of messages : (emacs:2302): Gtk-CRITICAL **: gtk_distribute_natural_allocation: assertion 'extra_space >= 0' failed I tested with dividers and horizontal scrollbars with the same results as before. -- Ola Nilsson