SWT does not support this setup "out of the box"
(i.e. one application -> two or more X servers).
The chance it will work is very
small. If you don't know GTK+/XLIB, the chance gets even
smaller.
Here's my current chain of thoughts.
1. If it is possible at all, you 100% need to
have a _separate_ Display object for this new shell. Because, every Display
represents one connection to X server.
2. For this separate Display you need to spin
another readAndDispatch() loop, probably in another thread :)
3. Even if (2.) is possible (almost for
sure there is little something in SWT and/or GTK which prohibits it), you
need to:
4. Check what gtk_init() does, in GTK+ docs.
gtk_init() is called when a new Display() is created. This function is
supposed to connect to X by checking the DISPLAY environment variable,
--display parameter (if supported) etc. etc.
5. Check whether and if you need to tweak the
call to gtk_init as it is currently done in Display class.
6. I would say, first, do it in GTK+ in a C app
and then try with SWT......
Hope this helps.
Ivan
----- Original Message -----
Sent: Tuesday, July 18, 2006 6:23
PM
Subject: Re: [platform-swt-dev] Create a
new shell on different X display
If it's possible in the native GTK API, then you can use native
methods to access the feature. You can obtain the handle for the
GTKWindow object from the Shell#handle field. (I think it goes without saying
that this will be platform specific) :-)
Daniel
_______________________________________________ platform-swt-dev
mailing
list platform-swt-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
|