[Top][All Lists]

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

Re: Adding fake cursors when resizing a window.

From: Eli Zaretskii
Subject: Re: Adding fake cursors when resizing a window.
Date: Thu, 07 Mar 2019 17:12:57 +0200

> Date: Wed, 06 Mar 2019 19:42:16 -0800
> From: Keith David Bershatsky <address@hidden>
> 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.

I'm confused by your description of the sequence of events.  Is this
what happens on NS, or are you saying you see this on X and w32 as
well?  I'm less familiar with the redisplay sequence on NS (and it
also recently tends to change frequently), but on X and w32 your
description is either inaccurate or misses something, because the
sequence AFAIK is like this:

  . redisplay_internal calls the condemn_scroll_bars_hook, which marks
    all scroll bars as candidates for deletion
  . then redisplay_internal calls redisplay_windows, which walks the
    window-tree and examines each window, whereby each window that is
    still alive in the window-tree "redeems" its scroll bars by
    marking them not to be deleted
  . then redisplay_internal calls judge_scroll_bars_hook, which
    removes all the scroll bars that were not "redeemed"
  . and only after that redisplay_internal calls update_frame, which
    calls update_window for each live window, and that ends up calling
    draw_glyphs to deliver the updated contents to the glass.

So I don't understand why you see draw_glyphs draw "underneath" the
scroll bar, since by the time draw_glyphs is called, the scroll bar in
the middle of the frame was supposed to be deleted already.

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

AFAIK, we already do that, at least on X and on w32.

reply via email to

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