From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#71866: 30.0.50; [macOS] Cursor hiding char behind it with certain theme customization Date: Tue, 9 Jul 2024 05:37:10 +0300 Message-ID: <1f5f741f-d599-4051-8a34-27d349360eb8@gutov.dev> References: <86frstfiop.fsf@gnu.org> <03b9a1c2-986d-40ea-bdd6-d13b419c9aa0@gutov.dev> <86v81i526t.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8185"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 71866@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 09 04:38:06 2024 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 1sR0k0-0001rO-UP for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Jul 2024 04:38:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sR0ju-0003PV-WD; Mon, 08 Jul 2024 22:37:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sR0jt-0003P5-0Z for bug-gnu-emacs@gnu.org; Mon, 08 Jul 2024 22:37:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sR0js-00028e-ON for bug-gnu-emacs@gnu.org; Mon, 08 Jul 2024 22:37:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sR0jx-0002qy-Tz for bug-gnu-emacs@gnu.org; Mon, 08 Jul 2024 22:38:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2024 02:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71866 X-GNU-PR-Package: emacs Original-Received: via spool by 71866-submit@debbugs.gnu.org id=B71866.172049264710923 (code B ref 71866); Tue, 09 Jul 2024 02:38:01 +0000 Original-Received: (at 71866) by debbugs.gnu.org; 9 Jul 2024 02:37:27 +0000 Original-Received: from localhost ([127.0.0.1]:51782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sR0jO-0002q5-SX for submit@debbugs.gnu.org; Mon, 08 Jul 2024 22:37:27 -0400 Original-Received: from fout2-smtp.messagingengine.com ([103.168.172.145]:45675) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sR0jN-0002ps-6u for 71866@debbugs.gnu.org; Mon, 08 Jul 2024 22:37:25 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.nyi.internal (Postfix) with ESMTP id BB71013812B3; Mon, 8 Jul 2024 22:37:14 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 08 Jul 2024 22:37:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1720492634; x=1720579034; bh=kBVhLzZzVwxlUVBnWnuV4SwXO0o1Qr4FYtpSltRV+VA=; b= f9p9oQeDShW+kNPX96zfzIklfpjmH80mK07Cju6Lz7ckdOmy9EY/h7jxwkeCCsO+ cozyHxDy5QFyoDmLoEZwHQO3sszovmDK/tM80492jPQgeVCOtdYgKX5ig7+JqAI9 qzNLNV6G3a0A1h8loap09TGBHillhIWxVoEanil3FFidC9ZaHDgXZ5UUYWsKcqez CIB1m2UPU8x/C5xkDl2xc+yqqSE4zRzTmMXPMLMfczxQkDrMqb6D/yptOrEv5dSW 0yg+QrdfDq6TKNUkdG36t5cnfZy9M81RxZzJUxjtSutGFC8Cwb3q5JZnWjaDyH4Y j/nrZee9M34FvVYiDRS4yQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1720492634; x= 1720579034; bh=kBVhLzZzVwxlUVBnWnuV4SwXO0o1Qr4FYtpSltRV+VA=; b=B 3ftqkoB0cZm41+KHW/Yof/CjleD2JA88Ay7EvkiIoARoBt3/a05oh2Qj1KF5G1fv g534VphKal4+0zpUMe9ywMAYE5egs6oc3IxqkEurF1ldqWsQIKNPWjm83EmhJXqE qPu0wMQ9nz3fn6Dh4M4eLYEh3lm4FioBf6aPPmawGNvy40H+8KGt870S2rjwZHQt DLpZEgMVZ59TMRq+Bdon41ZG9ZeWYPOohzg5pbnru/M13qUPLtvPaC3tRmRNvMEU rQuyNvN9kyvqUYcOd/I11OCBWd3mnC3k8RqTzFFRGuE6Ql/6NLynOfK/dRIhUUiO 5btMWCHLT5XW2NqSKB9Pw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdekgdeitdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveegudej heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Jul 2024 22:37:12 -0400 (EDT) Content-Language: en-US In-Reply-To: <86v81i526t.fsf@gnu.org> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288611 Archived-At: Hi Eli, On 06/07/2024 11:56, Eli Zaretskii wrote: >> Date: Tue, 2 Jul 2024 04:07:11 +0300 >> Cc: 71866@debbugs.gnu.org >> From: Dmitry Gutov >> >> On 01/07/2024 14:36, Eli Zaretskii wrote: >>> On other platforms, the code which draws the cursor is in draw_glyphs, >>> called from XXX_draw_window_cursor function (where XXX is the GUI >>> backend, in your case probably XXX = ns). If the same is true on >>> macOS, you could try stepping through that code. >> >> I can try following some more detailed instructions. I.e. I can set up a >> breakpoint, but would there be anything to look out for when stepping >> through the code? > > For starters, put a breakpoint in ns_draw_window_cursor and see if it > gets called in the scenario where you see the problem. Thank you. It does get called. Unfortunately, as soon as I put a breakpoint there, any attempt to switch to the Emacs window drops into the debugger again - and I have switch back to the terminal emulator to enter 'c RET' 20 times or so. So it seems difficult to go through the exact scenario where I'm switching between frames, where switching back to one draws the glyph incorrectly. Any advice with that? > If it does get called, it should call draw_phys_cursor_glyph in this > case (because the cursor type is FILLED_BOX_CURSOR). If it calls that > function, step through it. You should see there that it calls > draw_glyphs to draw the single character under the cursor. The actual > drawing happens here: > > /* Draw all strings. */ > for (s = head; s; s = s->next) > FRAME_RIF (f)->draw_glyph_string (s); > > where the draw_glyph_string method is a function in nsterm.m, > ns_draw_glyph_string. AFAICT, it should draw a character with the > foreground taken from the frame's background color and background > color taken from the cursor color. > > Something in this chain of calls doesn't happen in the scenario which > shows the problem. > >> BTW, this happens only right after I switch frames. Things start looking >> right again if I simply move point. > > Then step through the code after switching frames.