emacs-devel
[Top][All Lists]
Advanced

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

Adding fake cursors when resizing a window.


From: Keith David Bershatsky
Subject: Adding fake cursors when resizing a window.
Date: Wed, 06 Mar 2019 19:42:16 -0800

I am working on optimization of feature requests #22873 (multiple fake cursors) 
and #17684 (crosshairs that track the cursor position, and a visible fill 
column indicator).

The current design erases fake cursor before draw_glyphs is called, and then 
adds back the fake cursors with updated coordinates subsequent thereto.

Fact Pattern:  Two-window left/right split with vertical scroll bars on each 
window.  The user deletes the right window and the left window increases in 
size to fill the entire frame.  update_window is called and all of the fake get 
erased at the outset using the window's current_matrix before scrolling_window 
is called.  Then, draw_glyphs does its thing on the relevant lines and fake 
cursors are laid on each relevant line subsequent thereto.

From what I can tell, it appears that draw_glyphs is able to write glyphs 
_underneath_ the vertical scroll bar in the center of the screen (that is about 
to be removed).  However, drawing a rectangle (to create a fake cursor) from 
nsterm.m cannot write a fake cursor _underneath_ the vertical scroll bar in the 
center of the screen (that is about to be removed).  When the vertical scroll 
bar is removed from the center of the screen, the area where the fake cursor 
could not be drawn is readily apparent.

One of my thoughts on dealing with this issue is to remove the vertical scroll 
bar (splitting the 2 windows) before update_window runs.

Q:  Is my guess about what is happening correct?  And, when is the 
best/earliest point in time to draw the fake cursors in the area where the 
vertical scroll bar will be removed?

SCREENSHOT -- BEFORE:  https://www.lawlist.com/images/before_03_06_2019.png

SCREENSHOT -- AFTER:  https://www.lawlist.com/images/after_03_06_2019.png



reply via email to

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