[Xcb] Flicker-Free Window Management?
Bastien Dejean
nihilhill at gmail.com
Tue Oct 9 12:36:06 PDT 2012
Hi,
I would like to remove the flickering that occur when windows are
mapped, moved or resized from the tiling window manager I wrote: my
strategy is to create a window whose content is the current screen
content and to map it before resizing or moving windows and to unmap it
afterwards.
Here's how I create the window:
xcb_window_t blanket = xcb_generate_id(dpy);
uint32_t mask = XCB_CW_OVERRIDE_REDIRECT;
uint32_t values[] = {1};
xcb_create_window(dpy, XCB_COPY_FROM_PARENT, blanket, screen->root, 0, 0, screen_width, screen_height, 0, XCB_WINDOW_CLASS_INPUT_OUTPUT, XCB_COPY_FROM_PARENT, mask, values);
And here's the functions mapping / unmapping it:
void blanket_show(void)
{
xcb_aux_sync(dpy);
xcb_map_window(dpy, blanket);
xcb_aux_sync(dpy);
}
void blanket_hide(void)
{
xcb_aux_sync(dpy);
xcb_unmap_window(dpy, blanket);
xcb_aux_sync(dpy);
}
Unfortunately, it is not working consistently.
What am I missing?
Greetings,
--
b.d
(| |)
^ ^
More information about the Xcb
mailing list