all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: Eli Zaretskii <eliz@gnu.org>
Cc: alan@idiocy.org, 71866@debbugs.gnu.org
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	[thread overview]
Message-ID: <585145fb-ede0-4591-9cab-2165f137af32@gutov.dev> (raw)
In-Reply-To: <86wmlda3jb.fsf@gnu.org>

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.





  parent reply	other threads:[~2024-07-23  1:06 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-01  3:14 bug#71866: 30.0.50; [macOS] Cursor hiding char behind it with certain theme customization Dmitry Gutov
2024-07-01 11:36 ` Eli Zaretskii
2024-07-02  1:07   ` Dmitry Gutov
2024-07-06  8:56     ` Eli Zaretskii
2024-07-09  2:37       ` Dmitry Gutov
2024-07-09 11:31         ` Eli Zaretskii
2024-07-10  2:46           ` Dmitry Gutov
2024-07-10 11:58             ` Eli Zaretskii
2024-07-19  1:57               ` Dmitry Gutov
2024-07-20  8:30                 ` Eli Zaretskii
2024-07-20 15:46                   ` Dmitry Gutov
2024-07-20 16:03                     ` Eli Zaretskii
2024-07-21  0:53                       ` Dmitry Gutov
2024-07-21  7:20                         ` Eli Zaretskii
2024-07-21  9:04                           ` Eli Zaretskii
2024-07-21 23:22                             ` Dmitry Gutov
2024-07-21 13:50                           ` Dmitry Gutov
2024-07-21 14:55                             ` Eli Zaretskii
2024-07-21 23:58                               ` Dmitry Gutov
2024-07-22 14:45                                 ` Eli Zaretskii
2024-07-22 15:27                                   ` Alan Third
2024-07-22 16:02                                     ` Alan Third
2024-07-23  1:11                                       ` Dmitry Gutov
2024-07-23 11:19                                         ` Eli Zaretskii
2024-07-24  0:48                                           ` Dmitry Gutov
2024-07-24 11:32                                             ` Eli Zaretskii
2024-07-24 14:34                                               ` Dmitry Gutov
2024-07-24 16:29                                                 ` Eli Zaretskii
2024-07-24 19:22                                                   ` Dmitry Gutov
2024-07-24 20:08                                                     ` Dmitry Gutov
2024-07-25  5:01                                                     ` Eli Zaretskii
2024-07-25 16:14                                                       ` Dmitry Gutov
2024-07-22 16:10                                     ` Eli Zaretskii
2024-07-22 19:02                                       ` Alan Third
2024-07-22 19:15                                         ` Eli Zaretskii
2024-07-22 19:47                                           ` Alan Third
2024-07-23  1:06                                   ` Dmitry Gutov [this message]
2024-07-23 11:17                                     ` Eli Zaretskii
2024-07-02 23:42 ` Stefan Kangas
2024-07-07  2:03   ` Dmitry Gutov
2024-07-09 18:22     ` Stefan Kangas
2024-07-10  2:56       ` Dmitry Gutov
2024-07-23  7:40         ` Gerd Möllmann
2024-07-24  0:56           ` Dmitry Gutov
2024-07-24  3:48             ` Gerd Möllmann
2024-07-24 19:16               ` Dmitry Gutov
2024-07-25  3:03                 ` Gerd Möllmann
2024-07-25  5:39                   ` Eli Zaretskii
2024-07-25  5:58                     ` Gerd Möllmann
2024-07-25 14:46                   ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=585145fb-ede0-4591-9cab-2165f137af32@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=71866@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.