Re: synchronizing window frame/client repaint



On Wed, Dec 18, 2002 at 03:04:56PM -0500, Havoc Pennington wrote:
> 
> Hi,
> 
> Some of us have been discussing/experimenting with ways to make opaque
> resize look better. Soeren Sandmann has a really nice analysis of the
> problem (Soeren maybe you could post that here?). 
> 
> Basically opaque resize looks a little funny, Soeren tracks it to two
> kinds of lag:
> 
>  a) lag between the window frame and the application window. 
>     especially with the current XFree86 scheduler, the app tends
>     to get starved so the frame is redrawn a lot more often.

I seriously doubt this explanation.  All you can do in the window
manager is to resize the frame less often, which makes the
operation rather choppy.  A well written application *has* to
ignore many of the ConfigureNotify events in order to not redraw
excessively.

In my eyes, the root cause of the problem is that the application
does not know on which border it is resized and in which direction
before the frame is actually resized.  Thus, it can not set proper
bit_gravity and win_gravity on its windows to minimize redraws.
With the correct bit_gravity, the X server would move the window
contents to the right place automatically and no Expose event
would be generated for this region.

Another problem is that it is not possible to resize a tree of
windows in a single request.

Example:  You have a terminal window with a scrollbar which is a
sub window of the client window on the right side with
EastGravity.  The frame is resized on the right side.  Either the
scroll bar lags visibly behind the frame (growing), or the
scrollbar is outside the visible area of the window (shrinking).
To suppress this effect, you would have to make a request that
says:

  Resize the frame window to Wf+50 x Hf

AND (at the same time)

  Resize the parent window Wc+50 x Hc

AND (at the same time)

  Resize the client window Wc+50 x Hc

Still, the client would have to be informed about the new geometry
beforehand to give it a chance to adjust its gravities.

Bye

Dominik ^_^  ^_^



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