Hi Sam,<br><br>thank you for your answer. I have compiz 0.8.4 and there is a "Lazy Positioning" option <br>in the "Move Window" plugin settings page. It was on by default and turning it off solved<br>the problem! Now a window follows continuosly the changes of the other. Wunderbar.<br>
One thing more, however, which seems strange to me.<br>In case of a resize the movement of the "linked " window is perfectly smooth. But<br>in case of a move the movement is jerky, the window shivers and there is a noticeable<br>
spring effect i.e. there is a visible delay in the movement response. It seems strange to me<br>because there aren't two different code paths for the two cases, the code is perfectly the<br>same. I get a ConfigureNotify event, and on the basis of the new window position/geometry <br>
move the other, regardless of the type of the generating event (move or resize).<br>May be that in the two cases compiz generates configure notifications differently?<br>A huge thanks,<br><br>Luca<br><br><br><br><br><div class="gmail_quote">
2013/6/19 Sam Spilsbury <span dir="ltr"><<a href="mailto:smspillaz@gmail.com" target="_blank">smspillaz@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p dir="ltr">Hi Luca,</p>
<p dir="ltr">In recent versions of compiz (0.9.10) if you have lazy positioning on (org.compiz.move 'lazy-positioning') other clients won't get a configure notification until the end of the move. </p>
<p dir="ltr">This is a performance optimization to avoid a slow path on the nvidia drivers with vsync.</p>
<p dir="ltr">If you want such notifications you need to turn this option off. Either that or implement this as a compiz plugin so that you can get move notifications in real time.</p>
<p dir="ltr">Sam.</p>
<div class="gmail_quote"><div><div class="h5">On 19/06/2013 1:57 PM, "Luca Rocca" <<a href="mailto:disquisitiones@gmail.com" target="_blank">disquisitiones@gmail.com</a>> wrote:<br type="attribution"></div>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi,<br>I'm Luca from Savona, Italy.<br>I'm using Compiz and I'm writing an application with Xlib to draw two windows, <br>let's say window_A and window_B. I would like to keep fixed the relative position <br>
between two established corners of them that they have when mapped.<br>So that if I move or resize one of the window, the other if necessary automatically <br>moves to observe the condition. I'm close with this code, let's see for example<br>
the case for window A:<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">XSelectInput ( display, RootWindow ( display, 0 ), SubstructureNotifyMask );<br>
<br>XEvent event;<br>while ( true )<br>{<br> XNextEvent ( display, & event );<br> /* ... */<br> if ( event.type == ConfigureNotify and event.xconfigure.window == window_B )<br> {<br> // new_x, new_y based on event.xconfigure.x, event.xconfigure.y, etc...<br>
XMoveWindow ( display, window_A, new_x, new_y ); <br> }<br> /* ... */<br>}<br></blockquote><br>The problem is that the move correction of a window is only applied at the end of the move/resize <br>operation of the other and not continuously during it. <br>
Is there a way to obtain this as if the two windows could behave like one rigid body?<br>Thank you in advance,<br><br>Luca
<br></div></div>_______________________________________________<br>
compiz mailing list<br>
<a href="mailto:compiz@lists.freedesktop.org" target="_blank">compiz@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/compiz" target="_blank">http://lists.freedesktop.org/mailman/listinfo/compiz</a><br>
<br></blockquote></div>
</blockquote></div><br>