all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alan Third <alan@idiocy.org>
Cc: dmitry@gutov.dev, 71866@debbugs.gnu.org
Subject: bug#71866: 30.0.50; [macOS] Cursor hiding char behind it with certain theme customization
Date: Mon, 22 Jul 2024 22:15:17 +0300	[thread overview]
Message-ID: <86ikwx9r22.fsf@gnu.org> (raw)
In-Reply-To: <Zp6sweHZ9XaMEoVO@breton.holly.idiocy.org> (message from Alan Third on Mon, 22 Jul 2024 20:02:25 +0100)

> Date: Mon, 22 Jul 2024 20:02:25 +0100
> From: Alan Third <alan@idiocy.org>
> Cc: dmitry@gutov.dev, 71866@debbugs.gnu.org
> 
> On Mon, Jul 22, 2024 at 07:10:18PM +0300, Eli Zaretskii wrote:
> > So how would you suggest to arrange the breakpoints to be able to
> > match calls to ns_draw_window_cursor with what appears on the screen?
> >
> > Or maybe we can call some function after ns_draw_window_cursor returns
> > to make sure the results of ns_draw_window_cursor are immediately
> > shown on the glass?
> 
> I'm not sure if it's possible. The whole thing runs asynchronously.
> The best bet would be to put this:
> 
>   [[FRAME_NS_VIEW (f) layer] display];
> 
> at the end of ns_draw_window_cursor and look at it after that, but the
> display function passes a bitmap off to a system that supposedly tells
> the graphics card to pull in the bitmap using DMA and display it, all
> in a separate thread. So whether it will work or not I don't know.
> 
> It may be possible to access the bitmap and dump it to a file...
> 
>   CGContextRef context = [(EmacsLayer *)[FRAME_NS_VIEW (f) layer] getContext];
>   CGContextFlush (context);
>   void *pixels = CGBitmapContextGetData (context);
>   NSLog(@"pixels: %p, bytes: %lu, %lux%lu", pixels,
>         CGBitmapContextGetHeight (context) *
>         CGBitmapContextGetBytesPerRow (context),
>         CGBitmapContextGetHeight (context),
>         CGBitmapContextGetWidth (context));
> 
> Just before the final ns_unfocus in ns_draw_window_cursor should
> provide data about the image, and in lldb something like
> 
>   mem read -o ~/image.raw --count 10000 pixels --force
> 
> should dump the raw pixels to disk and in theory imagemagick or
> something could read them, but I'm failing to make this work. I think
> count is not bytes, and either way I can't convince imagemagick to
> read the output.

Hmm... doesn't sound very practical to me.

Are there any other ways of understanding why the cursor is sometimes
not shown (and at times even the character under the cursor is not
shown as well)?  If the relation between what the code does and what's
on display is basically impenetrable, how do people debug Emacs
display issues on macOS?





  reply	other threads:[~2024-07-22 19:15 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 [this message]
2024-07-22 19:47                                           ` Alan Third
2024-07-23  1:06                                   ` Dmitry Gutov
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=86ikwx9r22.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=71866@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    --cc=dmitry@gutov.dev \
    /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.