[Top][All Lists]

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

Re: Test whether buffer/window is ready for start_display, etc.

From: Eli Zaretskii
Subject: Re: Test whether buffer/window is ready for start_display, etc.
Date: Thu, 05 Oct 2017 11:03:39 +0300

> Date:  Wed, 04 Oct 2017 19:35:13 -0700
> From:  Keith David Bershatsky <address@hidden>
> Cc:  address@hidden
> Crosshairs and multiple fake cursors are drawn/erased when the following 
> functions are called, each depending upon the flavor of Emacs (NS, X11, W32). 
>  This approach is based upon the existing method in which the real cursor is 
> drawn.
> * ns_update_window_end (nsterm.m)
> * x_update_window_end (w32term.c)
> * x_update_window_end (xterm.c)

This design is very problematic.  The "normal" cursor is drawn in
update_window functions because it only depends on the location of
point, so it doesn't need to be redrawn if the window needs no update.
But your fake cursors are different, AFAIU, and require redrawing even
when the window didn't change.  So your idea (AFAIU) of following the
footsteps of normal cursor drawing is not a good idea.

The only safe way of displaying such stuff is by making
redisplay_window aware of the changes in the window, by, for example,
moving some overlay to where the fake cursor is drawn.

With your current design, as I understand it, you will have many
problems down the line, because it simply doesn't fit into how the
display engine works.  So I think you should redesign your
implementation, to have the fake cursors updated as part of the normal
window update code in redisplay_window.

reply via email to

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