emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nsterm.m: How to prevent _inactive_ window update from overreaching.


From: Alan Third
Subject: Re: nsterm.m: How to prevent _inactive_ window update from overreaching.
Date: Wed, 28 Nov 2018 21:31:09 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

On Mon, Nov 26, 2018 at 08:58:59PM -0800, Keith David Bershatsky wrote:
> 
> The present design calculates and draws/erases fake cursors based
> upon particular visible windows that get updated during redisplay,
> rather than rectangles within a particular window or set of windows.
> If I am understanding your comments correctly, it sounds like a new
> rectangle system of fake cursor calculation and drawing/erasing of
> fake cursors would need to be designed (solely for the benefit of
> MacOS Mojave users).

It’s not new and it’s not solely for Mojave. It’s the ‘expose’
functionality which comes into use when, say, one window is partially
covering another, but is then removed. The GUI toolkit fires an
‘expose event’ for the area that has just been uncovered (a
rectangle), and the application redraws that area.

You can find the code in xdisp.c beginning with the function
expose_frame.

What makes this particularly noticeable with the NS port now is that
we’re using it as the primary drawing mechanism as Mojave has removed
the previously used method.

> Or, at the very least, calculate fake cursors
> once for each visible window (where fake cursors are active) and
> then loop through cached coordinates when a rectangle is drawn to
> see if any fake cursors are contained within -- if so, then
> draw/erase fake cursors within that rectangle

‘expose_window’ appears to redraw the cursor in exposed windows, so
that may be a good place to look.

FWIW I asked about how the crosshair is drawn (since that was what you
were discussing originally) but you only talked about multiple
cursors. Am I to assume then that the crosshair drawing is tightly
integrated with the multiple cursors?
-- 
Alan Third



reply via email to

[Prev in Thread] Current Thread [Next in Thread]