How to move a window between screens?
Glynn Clements
glynn at gclements.plus.com
Fri Jan 9 19:32:55 PST 2009
Gerald Dachs wrote:
> > You either start the client on a proxy X server with "mobile" output
> > (e.g. Xvnc), or this sort of thing has to be done in the client.
>
> Too sad that it will not work, I don't believe that a proxy like
> Xvnc or xmove will be fast enough for xbmc showing movies,
There's no fundamental reason why a proxy won't work (I'm not saying
that existing options such as Xvnc will work, but that's an
implementation detail rather than indicative of a fundamental
problem).
The proxy (or protocol) would ideally need to explicitly support e.g.
Xv or OpenGL, so that you aren't forced to either use core Xlib for
the output (X11 protocol proxy) or up-convert the data unnecessarily
(rasterising proxy e.g. VNC).
It's may still be simpler to try to persuade the application or
toolkit to move its window. GTK+ (>= 2.2) even includes a function for
it:
void gtk_window_set_screen(GtkWindow *window, GdkScreen *screen);
Sets the GdkScreen where the window is displayed; if the
window is already mapped, it will be unmapped, and then
remapped on the new screen.
However, you need to bear in mind that properties which may previously
have been regarded as constant (e.g. root window, available visuals,
default visual etc) will become variables if you start migrating
between screens. Also, I don't know if the above will automatically
reconstruct e.g. pixmaps for icons or if you will need to replace
these manually.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the xorg
mailing list