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: Thu, 22 Nov 2018 22:57:20 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

Hi Keith,

On Thu, Nov 22, 2018 at 11:07:26AM -0800, Keith David Bershatsky wrote:
> In working on feature requests #17684 (crosshairs / visible fill
> column) and #22873 (multiple fake cursors), I have come across a
> situation where nsterm.m updates a portion of the _active_ window
> when updating the _inactive_ window. Although this is the case as of
> 11/16/2018, it was not the case back on 07/07/2018. The change
> occurred sometime between 07/07/2018 and 11/16/2018.
> 
> In the following examples, the _active_ window on the right gets
> updated first in time. Using a version of Emacs from 07/07/2018,
> updating the _inactive_ window does not cause the active window to
> be modified. Using a version of Emacs from 11/16/2018, updating the
> _inactive_ window updates a portion of the _active_ window. The
> update happens from the top of the window to the X axis of the
> cursor in the _inactive_ window.
> 
> In the 07/07/2018 screenshot, the crosshairs and visible fill column
> in the _active_ window are not touched by updates to the _inactive_
> window.
> 
> In the 11/16/2018 screenshot, the crosshairs and visible fill column
> in the _active_ window are partially erased by updates to the
> _inactive_ window.

There are two (potential) issues here:

 1. Something is marking a large portion of the frame as dirty, and
 it’s overflowing from the left window to the right, probably all the
 way to the right edge of the frame. That’s almost certainly a call to
 ns_clip_to_rect.

 2. When the right window is marked as dirty it’s failing to redraw
 completely. I’d assume what is happening is that the expose_frame
 functions (and its descendants) don’t notice that the crosshair needs
 to be redrawn. I’m unsure how that side of it works, something must
 have to compare the rectangle to be exposed with the contents of the
 frame and decide what needs redrawn.

IMHO both should be fixed. 1 because it’s redrawing too much, and 2
because there are other circumstances where part of your crosshair
could be marked as dirty and therefore need redrawn.

-- 
Alan Third



reply via email to

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