[Xcb] xcb_map_window flickering

Jamey Sharp jamey at minilop.net
Fri Jul 2 08:01:00 PDT 2010


On 6/25/10, Niklas Hambüchen <nh2 at deditus.de> wrote:
> I recently was annoyed that, whenever I open a new window or switch
> workspaces in the i3 window manager, there is a short, fast flickering
> in that window. Usually, it is white and consists of at least one white
> rectangle with the width of the window and about 1/4 of its height that
> flashes up and disappears.

You're probably observing drawing that is not synced to vertical
retrace. Non-composited desktops are generally not synced. Reducing
flicker is one of the advantages of compositing, if it's done right.

> So it seems that the flickering is created somewhere in xcb_map_window().

That function, like most functions named xcb_foo, does nothing but
send a MapWindow request to your X server. If you want to pursue this
further, you'll need to study how the server implements that request.

I believe the server will react by painting the window's background
color, if that is not None, and sending an Expose event to the
application. It takes time for the app to respond to that event by
repainting the window's contents.

I suspect your only solution is to use a compositing manager--perhaps
xcompmgr can coopeerate with i3? Certainly this is very unlikely to be
a bug in XCB, and if you'd like to explore the code more, perhaps the
xorg list would be more appropriate for discussion.


More information about the Xcb mailing list