[Xcb] R: Flickering

Alessandro Sangiuliano alex22_7 at hotmail.com
Thu Feb 25 07:45:43 UTC 2021

Hello Uli,

a nice thing, in this case, of objc, is that it is a superset of C; so each call to xcb library is just pure C.

The code where a window is moved is here in the XCBFrame class method moveTo (to be accurate, in Objective-C methods are called messages):


called from XCBConnection class method handleMotionNotify, here:


The If checks if we are in drag state and some other validity checks, like "we are not trying to move the root window"

The configureClient method is just a C a methiod that set an event and then send it with xcb_send_event.

Also, XCBRect, XCBPoint, XCBSize are just C structures. Making these structure as ObjC classes would involve the libobjc2 runtime too much, make all really slow.

I will try as soon as I can to add this message call on the moving window before the configure_client function:

[XCBWindow description], this message describe a window, with its rect(s) posizion, size, parent and so on.

Then I'll report here.

For x11trace, I have some problem with it, I will try to solve it.


Da: Uli Schlachter <psychon at znc.in>
Inviato: mercoledì 24 febbraio 2021 20:23
A: alex22_7 at hotmail.com <alex22_7 at hotmail.com>; xcb at lists.freedesktop.org <xcb at lists.freedesktop.org>
Oggetto: Re: [Xcb] Flickering


Am 24.02.21 um 12:24 schrieb alex22_7 at hotmail.com:
> Actually I noticed that on moving a window clicking on the title bar I have some flickering.

Looks to me as if the window is moved offscreen and then quickly again
moved to its "proper position". I'd look at some tracing output to
figure this out, e.g. via xtrace (also known as x11trace) on your WM. Or
on an app in question to see where it is moved to.

Alternatively, you could do some printf-debugging and print the window
position before every xcb_configure_window() call to see where it is
being moved to.

I can't really read objc, but... where is this moving of windows
implemented? I tried searching for xcb_configure_window(), but all the
hits don't seem relevant to "move by mouse".

- He made himself, me nothing, you nothing out of the dust
- Er machte sich mir nichts, dir nichts aus dem Staub
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/xcb/attachments/20210225/b27f7537/attachment-0001.htm>

More information about the Xcb mailing list