From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#28605: 26.0.60; Part of leftmost character hidden Date: Tue, 03 Oct 2017 11:15:53 +0200 Message-ID: <59D35549.6030905@gmx.at> References: <59CB5D69.7040404@gmx.at> <59CE05F2.1010202@gmx.at> <59CE8E74.5010308@gmx.at> 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 1507022582 29201 195.159.176.226 (3 Oct 2017 09:23:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 3 Oct 2017 09:23:02 +0000 (UTC) Cc: Lars Magne Ingebrigtsen , 28605@debbugs.gnu.org, Kaushal To: Ola Nilsson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 03 11:22:41 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 1dzJPM-0005mj-5J for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Oct 2017 11:22:32 +0200 Original-Received: from localhost ([::1]:57292 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzJPP-0001WL-VX for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Oct 2017 05:22:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzJK7-0005iQ-E9 for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 05:17:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzJK3-0004vH-Ej for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 05:17:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36497) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dzJK3-0004uk-9Y for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 05:17:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dzJK2-0000Wu-Vk for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 05:17:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Oct 2017 09:17: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.15070221811949 (code B ref 28605); Tue, 03 Oct 2017 09:17:02 +0000 Original-Received: (at 28605) by debbugs.gnu.org; 3 Oct 2017 09:16:21 +0000 Original-Received: from localhost ([127.0.0.1]:45178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzJJJ-0000VG-G4 for submit@debbugs.gnu.org; Tue, 03 Oct 2017 05:16:21 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:49950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzJJB-0000Uq-TZ for 28605@debbugs.gnu.org; Tue, 03 Oct 2017 05:16:14 -0400 Original-Received: from [192.168.1.100] ([46.125.250.123]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Lqn7e-1dLHmq3Gl8-00eMJW; Tue, 03 Oct 2017 11:16:02 +0200 In-Reply-To: X-Provags-ID: V03:K0:UwpXP0fYEdihVudVzhbm3zo4B0XZ9XYfE69FL6g+pkz/PJV+Bfw ST5LphLuJv0FyIKPmlrQg2XvgEZVdGlkoQYvKGWOYbTdSS0oOmw/kX6+yn96eMX4fKktcMJ lZ9xNt4Dr85pHDIFeC/sGTpyq3nOGH0fLzO2ulGTcLsbrvLEgWVC5J4WqurHCaOcj5ZnkYc eX7TyEcW9qu3k1GT6K96w== X-UI-Out-Filterresults: notjunk:1;V01:K0:NyPpn8bY7GI=:arFihTSUXh2NT4zX9HrIMs 9S+cm2rpTEsp+4BN0C9Zel/XA1mVLsUdhuBunZp/5BM1Q1jwe5+SoPRA/XwCAMCT9CNodeYBJ BVYIWP4U4diRx7jkrDRYrOIqbF9BWGOpDAWqNmryde6daJOUBH+5l9VKlQcTvQHkt/4idrs2S cmQ7YK4+dgnqWz/oeAcABwNfN6WQ5aLC7MGrtEzaUlMfYqIl1XgW8WUqmvFCypplA+JFEJncA ZiN1c+e5oQ3RW3zmnvd0Hu2guCXbWXwpfibz4FPzRly/0/KcFY5rtHk/pLCWZGpfz9jXquO/Q tYizDHLxY6EsW69uj5DxYG5s53hhncmKlZ3RWQyoMcY2MPxu+AFYhFLDOLbEgliFLgenpYHx+ slvxM/eDOI5vZWbPc0+cuVyQBcPHUv38bcR1r91FfggEtM6Dkpe8c4I9xvZi1fM6uAnXALboY Q5YxWqFkr7lkD9pyUqO0BoN2eTbhx3es3bDVd4dkRyKBZP7Oq3bfFnSyJmq+pQMxht2aYPREU A+1gnl+T8kwNiHZOXDXLICk6W7cPWsLOCI1xnitsAady5AojoITpOtzYX6Cx33rWv/eG8W8bV ouAyxO2vwxYOS2zBQxguLnTevX6AEgzZSUrj5wYDfo+ATSTGq8wdd1WTLBZ/GiZ6wOLQ5FK8K Ms/AbgkDHSYU5WNitkMtGh5ldtqkYz+Kb1WkEYT5hMcAgDg6cwg4MZdJ8YYNJQMzLdnJHl17a vGvAX753PJJV/uqYgJL3lDw4dcrhib6l48jp5StawqarP106ll0mWaHu8rrNYIACLVz4WMia 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:137815 Archived-At: > 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. Thanks, martin CC-ing Kaushal Modi: Is this the same problem as the one you posted in Bug#27830?