From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#42452: 27.0.91; hollow box cursor sometimes leaves artifacts Date: Mon, 29 Mar 2021 08:06:45 +0300 Message-ID: <83h7kumtui.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25521"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42452@debbugs.gnu.org To: Radon Rosborough Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 29 07:07:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lQk7J-0006X6-VZ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 Mar 2021 07:07:09 +0200 Original-Received: from localhost ([::1]:43414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQk7J-00089c-1I for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 Mar 2021 01:07:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQk7C-00089Q-S8 for bug-gnu-emacs@gnu.org; Mon, 29 Mar 2021 01:07:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35948) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQk7C-0002J6-Kv for bug-gnu-emacs@gnu.org; Mon, 29 Mar 2021 01:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lQk7C-00006z-Ey for bug-gnu-emacs@gnu.org; Mon, 29 Mar 2021 01:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Mar 2021 05:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42452 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 42452-submit@debbugs.gnu.org id=B42452.1616994410387 (code B ref 42452); Mon, 29 Mar 2021 05:07:02 +0000 Original-Received: (at 42452) by debbugs.gnu.org; 29 Mar 2021 05:06:50 +0000 Original-Received: from localhost ([127.0.0.1]:47494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQk70-00006A-E9 for submit@debbugs.gnu.org; Mon, 29 Mar 2021 01:06:50 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQk6y-00005x-Es for 42452@debbugs.gnu.org; Mon, 29 Mar 2021 01:06:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37582) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQk6s-00026i-Bi; Mon, 29 Mar 2021 01:06:42 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4263 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lQk6o-0000Cq-HE; Mon, 29 Mar 2021 01:06:41 -0400 In-Reply-To: (message from Radon Rosborough on Sun, 28 Mar 2021 15:21:47 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203220 Archived-At: > From: Radon Rosborough > Date: Sun, 28 Mar 2021 15:21:47 -0700 > > I've attached a patch that appears to resolve the problem for me. > > What we are doing in this patch is overriding the graphics context > configuration so that line_width is set to 1, rather than the default > of 0. There is somewhat detailed documentation from xlib on the > meaning of the line_width argument, and how to set it via XChangeGC, > here: https://tronche.com/gui/x/xlib/GC/manipulating.html > > In short, a line_width of 0 means "draw a line of width 1 pixel, but > use a device-dependent algorithm to do so, which may have higher > performance". Unlike setting line_width to 1, setting it to 0 does not > make any guarantees about the exact pixels that are rendered as part > of the line. Apparently, there is a bug in the X server's > device-dependent graphics code, or perhaps the graphics driver, which > causes the "device-dependent algorithm" to be buggy under some > circumstances, and draw a line of width 2 when a line of width 1 is > requested. Since this happens for unknown reasons, most probably some misfeature of the X server, the change to use an explicit line thickness is a debugging device. As such, it shouldn't be the default; instead, let's have a Lisp variable that gives the thickness, by default zero, and let users affected by this issue set the variable to whatever value that fixes the problem. > Other interesting behavior: If I set line_width explicitly to 2 rather > than to 1, then the graphical artifacts mentioned in the initial bug > report occur unconditionally, every time a hollow box cursor is > rendered. I cannot see anything when I go to the URL you posted, just a blank screen (a frequent problem with imgur.com), so I don't think I understand what "artifacts" are you alluding to. Does Emacs leave traces of the hollow cursor when it moves it to another location? Or are you alluding to the different thickness of some of the borders of the cursor? Thanks.