Subject: bug#52085: 29.0.50; Frame occasionally fails to paint while screen sharing on macOS

From: Alan Third <[email-masked]>
Date: Sun, 12 Dec 2021 12:08:06 +0000

On Thu, Dec 09, 2021 at 02:38:59AM -0500, Aaron Jensen wrote:
> On Thu, Dec 9, 2021 at 2:27 AM Eli Zaretskii <[email-masked]> wrote:
> >
> > > From: Aaron Jensen <[email-masked]>
> > > Date: Wed, 8 Dec 2021 16:33:06 -0500
> > >
> > > > To be honest, if I just want to see when one function is called I
> > > > stick in 'NSLog (@"Moo")' or whatever. There's too much output in
> > > > NSTRACE and I'm sure that sometimes it doesn't print out results from
> > > > things that are called deep in the toolkit code.
> > >
> > > Well, I can say with some certainty that those messages are the only
> > > ones appearing under typical operations like key presses. I can insert
> > > newlines into the terminal and observe that only those are emitted
> > > when I press keys or even scroll. So the display function is not being
> > > called unless there is some other wildness going on with the tracing.
> > > Do you expect it to be called every render? (It is also not called
> > > when I run M-: (redisplay))
> >
> > I'm not tracking this discussion, so apologies if what I say below
> > makes no sense.  However, the Emacs display engine avoids redrawing
> > anything if it concludes that what's on the glass is correct.  So just
> > calling 'redisplay', or making some simple changes that don't require
> > significant redrawing, don't necessarily result in calls to low-level
> > drawing functions, you need to do something drastic to force those
> > with 100% certainty.
> >
> > HTH
> 
> Even toggling between one buffer and another in a window fails to log
> anything but:
> 
> nsterm.m  : 6100: [ 2953]  [EmacsView keyDown:]
> nsterm.m  : 6393: [ 2954]  | [EmacsView hasMarkedText]
> nsterm.m  : 6284: [ 2955]  | [EmacsView insertText:]
> nsterm.m  : 6100: [ 2956]  [EmacsView keyDown:]
> 
> I'm probably missing something here...

I'm pretty sure it's just the NSTRACE calls not printing anything. As
I said previously NSTRACE sometimes doesn't print out results from
things that are called deep in the toolkit code. Like display.

Manually stick an NSLog into the display function.

-- 
Alan Third