From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#34569: 26.1.90; Zero wide scroll bars Date: Sat, 23 Feb 2019 15:01:54 +0100 Message-ID: <5C715252.1060104@gmx.at> References: <5C6BC77F.6020104@gmx.at> <83sgweq1d6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="29995"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34569@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 23 15:03:20 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gxXte-0007eK-Ca for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Feb 2019 15:03:18 +0100 Original-Received: from localhost ([127.0.0.1]:38393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gxXtd-00056O-9Q for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Feb 2019 09:03:17 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gxXtR-00055x-La for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2019 09:03:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gxXtQ-0005NO-RK for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2019 09:03:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35450) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gxXtN-0005N6-SS for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2019 09:03:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gxXtN-0005pJ-OG for bug-gnu-emacs@gnu.org; Sat, 23 Feb 2019 09:03:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Feb 2019 14:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34569 X-GNU-PR-Package: emacs Original-Received: via spool by 34569-submit@debbugs.gnu.org id=B34569.155093052522322 (code B ref 34569); Sat, 23 Feb 2019 14:03:01 +0000 Original-Received: (at 34569) by debbugs.gnu.org; 23 Feb 2019 14:02:05 +0000 Original-Received: from localhost ([127.0.0.1]:48991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gxXsS-0005nx-Mo for submit@debbugs.gnu.org; Sat, 23 Feb 2019 09:02:04 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:42373) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gxXsQ-0005nT-Fx for 34569@debbugs.gnu.org; Sat, 23 Feb 2019 09:02:03 -0500 Original-Received: from [192.168.1.101] ([212.95.5.103]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M4002-1hFlFQ3j8s-00rZFs; Sat, 23 Feb 2019 15:01:54 +0100 In-Reply-To: <83sgweq1d6.fsf@gnu.org> X-Provags-ID: V03:K1:dezASRz/+YEmICerUlp+X25NplcLCYtJEgy/KAtO8Y6Gvigd7vA 4YxWC13jqFzwZaNkEe/qMwoBld0nJGzv+GFiBE3jantWbgKtRyW+dz+ofQNjRVoHB9pYjQ2 Ot1vBB2or7a3SUtdZcJBt0/i7u8fxHSZBvdF7re8h3/TWQIwaQ6QvVKWaVbQpRSz87+m6yN wflR1BFMjOq9gbE/2tr1w== X-UI-Out-Filterresults: notjunk:1;V03:K0:3oc+puUKkV4=:au+ggWSRioyPD4ZupqZ8VX r/BmnfMAfgOegfl2nX9GVjFTxMOVrWAE7plwDunK9z38d2hZaI2bcdJiCc0IQZ6yQAJeCd3F5 LAKI6RMbI8uQc4I4vlPRwPC05Xv2zYQRUDRgQjzBhri1ltxiINN8YqaeAZtcApKyApFL/G646 Rpsu93aDU0HOun65iXz6CoA+JIwIuhsd7uwaUVOXFl7ZuHtuL+Eh4rXeRs2GZnEcThnvhbv5Z ls5gP7GpTtNrSsp5k0Xeq1sOUY2UUXlm7bkknkQFyquZtdpXn2p6JOsbhxn17auWsq5E2FEoO 2VDKgEEBogIr+sEjpcSjLyhmPVe1yEjmReGKZ+cNICA6DS2fmP4w7WjrXMjdXJv9VQOqawsVz /br24CRof6xHVlfbMJLU1iMZF8W3pXkxAILdtrDyoHxBcHOjxTe6ISzbmq0WqdAfYIM35M3zg kYG/MommTgyo13o4R7TSFtzGKVcWl3aYiBXRQpNGGVQ3ly9DRhYn1HZBIlhp1/m/pALeruBFG A6h3EFIuKcweMa1/cFnAXzC6GCNrZ0cUxMtL0wX6xrr8lO9kQ6rlPAj4aUyA6Ux3un7wHqZvq WIVC36e8QUXAe1fgCNk/oTZ4UNaJra1LaeWHAGvcwSbXYM3gAhSpwqGZT10ar2CO6kM1VdsKP we6sgknJUF1CVF4xDw0BT2vDWM/ZgDHUFJNI5GPS2Bl6FfnItLbzNU5G2XMF7b1PqikZW8fn4 PRPnIbFC4b5AIsLk7FftbBuj9PSlXk+8/mRf9ija4Je9JhjVPF4nXxikUtCztlBjeHMyWlFP 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: 209.51.188.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:155692 Archived-At: > Why would users set 'scroll-bar-width' to zero, instead of turning off > scroll-bar-mode? When they want to turn scroll bars off for a specific frame. Turning scroll bars on later would leave the frame with zero width scroll bars alone. It won't work but it could be the idea. > Or are you saying that turning off scroll-bar-mode > also produces the same bugs? No (otherwise this would have been an issue known ever since). > If turning off scroll-bar-mode does work, then how about disabling the > direct setting of 'scroll-bar-width', either silently or noisily? Setting 'scroll-bar-width' is fragile. With GTK builds you can set it, Emacs will respect it and GTK will either overdraw or leave a gap because you can't change the GTK scroll bar from within Emacs. Note the dual use of this parameter: 'scroll-bar-width' is (1) passed on to the toolkit to draw scroll bars of the desired width and (2) used by Emacs to clear various areas of the window and calculate the width of the text area. But yes: One way to fix the aborts should be to disallow setting the 'scroll-bar-width' frame parameter to zero. >> /* Width that a scroll bar in frame F should have, if there is one. >> Measured in pixels. >> If scroll bars are turned off, this is still nonzero. */ >> #define FRAME_CONFIG_SCROLL_BAR_WIDTH(f) ((f)->config_scroll_bar_width) >> >> This comment is, unfortunately, wrong > > But the comment says "disabled", not "width set to zero". is it > correct when scroll-bar-mode is turned off? If so, perhaps just > qualifying the comment by the method by which the scroll bars are > disabled will be good enough? This hints at another way of fixing the aborts: Handle zero wide scroll bars just as if scroll bars were disabled/turned off. >> Note also that with emacs 27.1 the bug can be produced more directly by >> including >> >> (setq default-frame-alist '((vertical-scroll-bars . nil) (scroll-bar-width . 0))) >> >> in the early-init.el and then enabling vertical scroll bars. The >> indirection via 'frame-notice-user-settings' is not needed there. > > If we disallow setting this parameter directly, or at least setting it > to zero, this problem will also go away, right? Why would we disallow setting this parameter directly? On Windows it works perfectly. On Lucid and Motif all widths but zero work well. martin