<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="margin:0px;font-size:12pt;background-color:rgb(255, 255, 255)">Hello Uli,</span>
<div style="margin:0px;font-size:12pt;background-color:rgb(255, 255, 255)"><br>
</div>
<div style="margin:0px;font-size:12pt;background-color:rgb(255, 255, 255)">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.</div>
<div style="margin:0px;font-size:12pt;background-color:rgb(255, 255, 255)"><br>
</div>
<div style="margin:0px;font-size:12pt;background-color:rgb(255, 255, 255)">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):<br>
<br>
<a href="https://github.com/AlessandroSangiuliano/XcbKit/blob/70-resizing/XCBKit/XCBFrame.m#L602" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="margin:0px">https://github.com/AlessandroSangiuliano/XcbKit/blob/70-resizing/XCBKit/XCBFrame.m#L602</a> </div>
<div style="margin:0px;font-size:12pt;background-color:rgb(255, 255, 255)"><br>
</div>
<div style="margin:0px;font-size:12pt;background-color:rgb(255, 255, 255)">called from XCBConnection class method handleMotionNotify, here:</div>
<div style="margin:0px;font-size:12pt;background-color:rgb(255, 255, 255)"><br>
</div>
<div style="margin:0px;font-size:12pt;background-color:rgb(255, 255, 255)"><a href="https://github.com/AlessandroSangiuliano/XcbKit/blob/70-resizing/XCBKit/XCBConnection.m#L790" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="margin:0px">https://github.com/AlessandroSangiuliano/XcbKit/blob/70-resizing/XCBKit/XCBConnection.m#L790</a></div>
<div style="margin:0px;font-size:12pt;background-color:rgb(255, 255, 255)"><br>
</div>
<div style="margin:0px;font-size:12pt;background-color:rgb(255, 255, 255)">The If checks if we are in drag state and some other validity checks, like "we are not trying to move the root window"<br>
<div class="x__Entity x__EType_OWALinkPreview x__EId_OWALinkPreview x__EReadonly_1" style="margin:0px">
</div>
<br>
</div>
<div style="margin:0px;font-size:15px;font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;color:rgb(32, 31, 30);background-color:rgb(255, 255, 255)">
<div style="margin:0px"></div>
<div style="margin:0px;font-size:12pt;font-family:Calibri, Helvetica, sans-serif;color:rgb(0, 0, 0)">
The configureClient method is just a C a methiod that set an event and then send it with xcb_send_event.<br>
<br>
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.</div>
<div style="margin:0px;font-size:12pt;font-family:Calibri, Helvetica, sans-serif;color:rgb(0, 0, 0)">
<br>
</div>
<div style="margin:0px;font-size:12pt;font-family:Calibri, Helvetica, sans-serif;color:rgb(0, 0, 0)">
I will try as soon as I can to add this message call on the moving window before the configure_client function:</div>
<div style="margin:0px;font-size:12pt;font-family:Calibri, Helvetica, sans-serif;color:rgb(0, 0, 0)">
<br>
</div>
<div style="margin:0px;font-size:12pt;font-family:Calibri, Helvetica, sans-serif;color:rgb(0, 0, 0)">
[XCBWindow description], this message describe a window, with its rect(s) posizion, size, parent and so on.</div>
<div style="margin:0px;font-size:12pt;font-family:Calibri, Helvetica, sans-serif;color:rgb(0, 0, 0)">
<br>
</div>
<div style="margin:0px;font-size:12pt;font-family:Calibri, Helvetica, sans-serif;color:rgb(0, 0, 0)">
Then I'll report here.</div>
<div style="margin:0px;font-size:12pt;font-family:Calibri, Helvetica, sans-serif;color:rgb(0, 0, 0)">
<br>
</div>
<div style="margin:0px;font-size:12pt;font-family:Calibri, Helvetica, sans-serif;color:rgb(0, 0, 0)">
For x11trace, I have some problem with it, I will try to solve it.</div>
<div style="margin:0px;font-size:12pt;font-family:Calibri, Helvetica, sans-serif;color:rgb(0, 0, 0)">
<br>
</div>
<div style="margin:0px;font-size:12pt;font-family:Calibri, Helvetica, sans-serif;color:rgb(0, 0, 0)">
Cheers,</div>
<span style="margin:0px;font-size:12pt;font-family:Calibri, Helvetica, sans-serif;color:rgb(0, 0, 0)">Alex</span></div>
<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Da:</b> Uli Schlachter <psychon@znc.in><br>
<b>Inviato:</b> mercoledì 24 febbraio 2021 20:23<br>
<b>A:</b> alex22_7@hotmail.com <alex22_7@hotmail.com>; xcb@lists.freedesktop.org <xcb@lists.freedesktop.org><br>
<b>Oggetto:</b> Re: [Xcb] Flickering</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Hi,<br>
<br>
Am 24.02.21 um 12:24 schrieb alex22_7@hotmail.com:<br>
> Actually I noticed that on moving a window clicking on the title bar I have some flickering.<br>
<br>
Looks to me as if the window is moved offscreen and then quickly again<br>
moved to its "proper position". I'd look at some tracing output to<br>
figure this out, e.g. via xtrace (also known as x11trace) on your WM. Or<br>
on an app in question to see where it is moved to.<br>
<br>
Alternatively, you could do some printf-debugging and print the window<br>
position before every xcb_configure_window() call to see where it is<br>
being moved to.<br>
<br>
I can't really read objc, but... where is this moving of windows<br>
implemented? I tried searching for xcb_configure_window(), but all the<br>
hits don't seem relevant to "move by mouse".<br>
<br>
Cheers,<br>
Uli<br>
-- <br>
- He made himself, me nothing, you nothing out of the dust<br>
- Er machte sich mir nichts, dir nichts aus dem Staub<br>
</div>
</span></font></div>
</div>
</body>
</html>