A few GDK questions

I'm looking at using GDK for my application, to make life a bit easier
for me.  Though, it seems that it might actually do the opposite.
Currently, the application uses Xlib for most things, which is a royal
pain, but GDK seems to assume that you want to live in a very isolated
environment.  For example, if I call Xlib's XGetSelectionOwner for
_NET_SYSTEM_TRAY_S0, I get the system tray window.  If I call GDK's
gdk_get_selection_owner_for_display() for _NET_SYSTEM_TRAY_S0, I get
NULL, because my application doesn't "know" about the window.

I can only assume that because GDK and GTK+ applications seem to be
able to work together with things like the system tray, that there is a
way to do this.  A few applications that I have seen that use GDK/GTK+
perform calls to Xlib to do that, and then create a new "foreign" GDK
window.  However, this is rather impractical in my situation, as I
really do only want one layer to the system.  I am using Vala, so GDK
would seem like the natural choice since there are already wrappers for
it, but if I really had to I could wrap Xlib if necessary, since the
application really does depend on knowing about a good number of things
that are going on with the window system.

I am quite new with GDK (as well as Xlib), too, so I apologize if I am
asking questions that are seemingly obvious; I am probably not
knowledgeable enough to enter the right keywords into Google to find
the documentation that covers what I am looking for.

In any case, essentially what I am looking for is a way to look at
windows, selections, etc., the way you'd see them from Xlib, but with
the GDK API which seems to be---for the most part---vastly better.  It
helps that it's representable already in Vala, and I really, _really_
would like to avoid writing Xlib bindings if I can avoid it at all.
Xlib looks just *awful* to wrap correctly.

	--- Mike

My sigfile ran away and is on hiatus.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]