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, 23 Jul 2024 04:06:39 +0300 Message-ID: <585145fb-ede0-4591-9cab-2165f137af32@gutov.dev> References: <86frstfiop.fsf@gnu.org> <03b9a1c2-986d-40ea-bdd6-d13b419c9aa0@gutov.dev> <86v81i526t.fsf@gnu.org> <1f5f741f-d599-4051-8a34-27d349360eb8@gutov.dev> <86sewiztr2.fsf@gnu.org> <867cdto3uk.fsf@gnu.org> <56cc929b-5491-4ed4-a527-d0b1a369e625@gutov.dev> <86o76sea9d.fsf@gnu.org> <72a0b2e2-600e-46f1-b583-0bed86f27d2d@gutov.dev> <86o76scaou.fsf@gnu.org> <86cyn7cito.fsf@gnu.org> <1659357b-5ca0-47a6-8ff3-4aa26017280b@gutov.dev> <86ttgibxqv.fsf@gnu.org> <7ae61592-8319-4b1a-b973-4015ff1db569@gutov.dev> <86wmlda3jb.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="6178"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: alan@idiocy.org, 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 23 03:07:34 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 1sW406-0001Q0-0V for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Jul 2024 03:07:34 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sW3zf-0006hY-5b; Mon, 22 Jul 2024 21:07:07 -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 1sW3zW-0006CT-Pw for bug-gnu-emacs@gnu.org; Mon, 22 Jul 2024 21:06: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 1sW3zW-0000Gg-IA for bug-gnu-emacs@gnu.org; Mon, 22 Jul 2024 21:06:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sW3zZ-0004iK-PK for bug-gnu-emacs@gnu.org; Mon, 22 Jul 2024 21:07: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, 23 Jul 2024 01:07: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.172169681618109 (code B ref 71866); Tue, 23 Jul 2024 01:07:01 +0000 Original-Received: (at 71866) by debbugs.gnu.org; 23 Jul 2024 01:06:56 +0000 Original-Received: from localhost ([127.0.0.1]:58793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sW3zT-0004hz-Hi for submit@debbugs.gnu.org; Mon, 22 Jul 2024 21:06:55 -0400 Original-Received: from fout1-smtp.messagingengine.com ([103.168.172.144]:53325) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sW3zQ-0004hk-4G for 71866@debbugs.gnu.org; Mon, 22 Jul 2024 21:06:54 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.nyi.internal (Postfix) with ESMTP id 2ED421380186; Mon, 22 Jul 2024 21:06:43 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 22 Jul 2024 21:06:43 -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=1721696803; x=1721783203; bh=bqNhbrx/I19IjgssWi4uen7P8xqp284qCaK/hOWLcuQ=; b= ic8v/fr6UMaCAeL4+z+E8xZC4UCe+2lf7I4BP9WwL710u6NdymxGXGdo+UPdjVNK aA3TM6UKYEt7s9nrxdSBOAwahHStRZnjkzC/J+CJjNXIZay/tuUj2zV7QT8yTRFe dW2muC+Hnnrm5VFNnA4xEyA61eGhex7+FaEbE/032wvCcp3NvClBCnbre/B13UGP qJ+MR4s6P271TUOM5fuyRMgOqJl47tCXU5gTXIS0QCwPErdL9nK2mMM8trIl11Zq F4IU6WjYKfXml3Y6H5ioVNjThh8KpuZzhDhYjjkPywwpIqaS/ot1FXZRK0kzMBKl fMH9Q6XV+cficNPzJEgh4w== 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=fm3; t=1721696803; x= 1721783203; bh=bqNhbrx/I19IjgssWi4uen7P8xqp284qCaK/hOWLcuQ=; b=T b+Q09VmOl78caB7sBI+775KSGU0TY+S0xb6Re2QaUisKGu98/TT1hHmGFh5pGB5h VX9Ryr8f/UsiqP/SIoDigJaL6obh7yZHQXd1nUJZKXJHCQ3VEjZqUQIBZ6Ny0UOT tPoiHfgnmctQQ1olfL/a/onsaitXECLA0lbl1uX4ZMZJnIa/c6uB2VrSrg2FTwRg PkuP2548DeY1ApIYbal1Io6QfsbO7guHLqFe6R7OYz4XANv5kyotsN2Gv9w951mI THqwkHT9s6DKWTDDdoSayNa7cRdaoa9lL2OvNx5j1ROrM6D6TBP9Dj2YcwpTwPXC ewx83EUjhkAw6dPA28GQA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrheekgdeggecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveegudej heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 22 Jul 2024 21:06:41 -0400 (EDT) Content-Language: en-US In-Reply-To: <86wmlda3jb.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:289132 Archived-At: On 22/07/2024 17:45, Eli Zaretskii wrote: > But note that both at the beginning of this new video and at its end, > where the debugger says "resuming" (which means Emacs is running), the > 3 circles of both Emacs frames are gray. So I guess (a) this does > happen when Emacs runs, and (b) it probably means focus is in some > other window, not in any of the Emacs frames. Yes, I started this second video with focus in the terminal emulator (on the right - you could see that I was typing there some into text for the person watching). So that seems fine, no bug there. Then I switch to the first Emacs frame, and its chrome becomes colored. We spend most of the video in the terminal emulator as well (which is necessary for me to handle the breakpoints), so overall that's expected. You could notice somewhere in the middle of the video that after I handle a bunch of breakpoints the focus finally shifts to Emacs, second frame. But more breakpoints hit, so I have to switch back to the terminal emulator until the end of the recording. >>> All of the backtraces from all the calls produced by a single M-` >>> press. It is best to have only the backtraces that happen when the >>> problem with the cursor is visible, if you can easily arrange for >>> that. >> >> Yup, done that, see below. > > Thanks. There's a disturbing discrepancy between what the debugger > says about the calls to ns_draw_window_cursor and what I see on > display. For example, there are only 2 events where one of the two > Emacs frames begins showing a filled-block cursor (from some other > cursor display): at step "1" and step "3". But the backtraces you > collected tell a different story: the only calls with > FILLED_BOX_CURSOR are at steps "1" and "7". At step "3", the debugger > claims we called ns_draw_window_cursor with NO_CURSOR, whereas the > video clearly shows that the cursor is drawn as a filled block! This > issue alone already makes all this quite mysterious and hard to > interpret. That sounds interesting but a bit too complex for me to address, for now. > Moreover, the only event in the video where a previously-displayed > cursor disappears in one of the windows is the last part, where you > type "c" and the debugger says "Process 7616 resuming". And that > happens without ns_draw_window_cursor being called! I think that could still have happened in ns_draw_window_cursor. We hit the breakpoint at the beginning of the function, right? So when I just choose 'continue' the rest of the function executes, and the thing with the cursor might happen then. > I also don't understand the calls where cursor_type=NO_CURSOR, > on_p=true, and active_p=false. I would expect to see > HOLLOW_BOX_CURSOR there, because these are the calls where we display > the cursor in a non-selected window. Could you step inside > get_window_cursor_type and see how this happens? To arrange for that, > get to the step before the one where the breakpoint in > ns_draw_window_cursor will break with the above combination of > arguments (for example, get to step "3" in your session), then add a > breakpoint in display_and_set_cursor, trigger the next cursor display > by typing "continue", then step through display_and_set_cursor and > into get_window_cursor_type, and see why we end up deciding to display > NO_CURSOR in that case. Thanks for the instructions, I think I'll do that tomorrow. > Also, what are your values of cursor-type and > cursor-in-non-selected-windows? The defaults (or the default for the platform, maybe): cursor-type is t, cursor-in-non-selected-windows is t.