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#71866: 30.0.50; [macOS] Cursor hiding char behind it with certain theme customization Date: Sat, 06 Jul 2024 11:56:10 +0300 Message-ID: <86v81i526t.fsf@gnu.org> References: <86frstfiop.fsf@gnu.org> <03b9a1c2-986d-40ea-bdd6-d13b419c9aa0@gutov.dev> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38251"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71866@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 06 10:57:20 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 1sQ1EN-0009i5-Ep for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Jul 2024 10:57:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQ1E4-0003vL-2X; Sat, 06 Jul 2024 04:57:00 -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 1sQ1E3-0003v7-5y for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2024 04:56:59 -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 1sQ1E2-0001EM-UE for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2024 04:56:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sQ1E6-0007ae-DT for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2024 04:57: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: Sat, 06 Jul 2024 08:57:02 +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.172025618329100 (code B ref 71866); Sat, 06 Jul 2024 08:57:02 +0000 Original-Received: (at 71866) by debbugs.gnu.org; 6 Jul 2024 08:56:23 +0000 Original-Received: from localhost ([127.0.0.1]:45580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sQ1DS-0007ZI-Js for submit@debbugs.gnu.org; Sat, 06 Jul 2024 04:56:22 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sQ1DQ-0007Z0-MB for 71866@debbugs.gnu.org; Sat, 06 Jul 2024 04:56:21 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sQ1DH-000190-PR; Sat, 06 Jul 2024 04:56:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=1BdYoelxdSetG6Y8gVs9odt09GsqFidnDBBSNaD2tN8=; b=D/NC/nxjaNCo pB5+yRoQ6ErFDR2mt0TgbFsFiHBM2RS4kme/dAd2Nj1L7kahSQUUWn9WSZxsdE6OHIvwnMFgH8wVp ArRypjGdLHgzIf1EbVJKTO1fIx78QcwJNAnZ2+G5OQoz4rLMRNPQuS1o4t0wrjSLL4ujYODkQZTkk sLIItvs9l4pbTCvjFu8u54ZANobpThJt343ush88iHEzO4UaasOo+1vfkRpo7zn0HHW624yH1vncQ BpqUGVYiZFsxBrDZgb0pLpZrYKxzK8c8KbV6tbTSzbmEfFpX5x71t/4f4TvNDDl/H4tZXPaprK2so NNCnFGiQIA2F0DO7DSfSmQ==; In-Reply-To: <03b9a1c2-986d-40ea-bdd6-d13b419c9aa0@gutov.dev> (message from Dmitry Gutov on Tue, 2 Jul 2024 04:07:11 +0300) 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:288481 Archived-At: > 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. 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.