[Xcb] Flicker-Free Window Management?

Andrew Gallant jamslam at gmail.com
Tue Oct 9 12:38:48 PDT 2012


I know this doesn't directly answer your question, but you might try
running a lightweight compositor like `xcompmgr`. It seems to reduce
or remove most flicker for me. (i.e., things appear smoother.)

- Andrew


On Tue, Oct 9, 2012 at 3:36 PM, Bastien Dejean <nihilhill at gmail.com> wrote:
> 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
> (| |)
>  ^ ^
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb


More information about the Xcb mailing list