Mark Leisher wrote:
Mark Leisher wrote:
Attached are two small programs, gtk.c and x11.c. Both are meant to
demonstrate how to use a GdkAtom/Atom to determine if an instance of a
program is already running (Linux/Unix).
I've finally tracked down the problem. When the call to
gdk_selection_owner_get() is done, the proper selection XID is returned
as being the owner of the selection, but there is no entry in the
GtkDisplay's XID hashtable (xid_ht).
Well, another case of me missing the obvious. Never mind, it isn't actually a
problem. When the second instance of the gtk.c program is run, it only has the
list of windows created for the process. It doesn't know about windows created
in other processes. GDK would have to create a list of all property owner
windows at startup to make this work like I expected.
The way to make it work is to make calls directly to Xlib. Of course that only
works on Unix/Linux.
--
---------------------------------------------------------------------------
Mark Leisher
Computing Research Lab A sneer is the weapon of the weak.
New Mexico State University -- James Russell Lowell (1819-1891)
Box 30001, MSC 3CRL
Las Cruces, NM 88003
_______________________________________________
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list