[compiz] incomplete window contents when unminimizing

David Reveman davidr at novell.com
Fri Apr 13 09:51:30 PDT 2007


On Wed, 2007-04-11 at 03:29 -0500, Erkin Bahceci wrote:
> Hi,
> 
> Using Xgl, when a window is unminimized, sometimes (especially with
> Firefox), the window contents are not immediately visible (partially
> or completely) until an unminimize animation is completed. That is,
> sometimes there are empty (transparent) rectangles within the window
> (maybe corresponding to some Mozilla controls), and sometimes the
> whole window is empty (only the decoration is visible). This is more
> of an issue with cpu-hungry effects (well, most of them if you are
> using Xgl + fglrx).
> 
> To avoid this, I want to wait until the window contents are *fully*
> available before I start any unminimize animations. My question is how
> can I know the right time? Is there a certain place in core that I can
> maybe throw a notification event from for this? If not, what is the
> best way to solve this problem? Should I just wait for a certain
> amount of time for certain applications (like Firefox)?

The sync request protocol (_NET_WM_SYNC_REQUEST in the EWMH spec) allow
this and compiz should automatically wait with drawing windows until
window contents is *fully* available for applications that support it.

A damageWindowRect call with "initial" argument set to TRUE is the
indication that a newly mapped window has become available for drawing.

It's not much we can do for applications that don't support the sync
request protocol. Compiz will currently consider the first damage event
an indication that the window is available for drawing and I don't think
we can do much better than that.

All gtk apps should automatically support this protocol but I'm not sure
about Firefox. Waiting for a certain amount of time is a bad idea. If an
application doesn't support the sync request protocol you should bug the
developers.

- David



More information about the compiz mailing list