[compiz] Relative position between two windows
Luca Rocca
disquisitiones at gmail.com
Tue Jun 18 22:57:10 PDT 2013
Hi,
I'm Luca from Savona, Italy.
I'm using Compiz and I'm writing an application with Xlib to draw two
windows,
let's say window_A and window_B. I would like to keep fixed the relative
position
between two established corners of them that they have when mapped.
So that if I move or resize one of the window, the other if necessary
automatically
moves to observe the condition. I'm close with this code, let's see for
example
the case for window A:
XSelectInput ( display, RootWindow ( display, 0 ), SubstructureNotifyMask );
>
> XEvent event;
> while ( true )
> {
> XNextEvent ( display, & event );
> /* ... */
> if ( event.type == ConfigureNotify and event.xconfigure.window ==
> window_B )
> {
> // new_x, new_y based on event.xconfigure.x, event.xconfigure.y,
> etc...
> XMoveWindow ( display, window_A, new_x, new_y );
> }
> /* ... */
> }
>
The problem is that the move correction of a window is only applied at the
end of the move/resize
operation of the other and not continuously during it.
Is there a way to obtain this as if the two windows could behave like one
rigid body?
Thank you in advance,
Luca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/compiz/attachments/20130619/cf1adec4/attachment.html>
More information about the compiz
mailing list