[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: GtkWindow from X window id
- From: "Tristan Van Berkom" <tvb gnome org>
- To: "Brian J. Tarricone" <bjt23 cornell edu>
- Cc: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Re: GtkWindow from X window id
- Date: Thu, 10 Apr 2008 15:19:13 -0300
On Thu, Apr 10, 2008 at 3:15 PM, Brian J. Tarricone <bjt23 cornell edu> wrote:
> Xavier Toth wrote:
> > Is it possible to retrieve a GtkWindow using the native X window id?
>
> Something like this might work:
>
> GdkWindow *window = gdk_window_lookup(xid);
> GtkWidget *widget = gdk_window_get_user_data(window);
>
> Of course that only works if 'xid' corresponds to a GtkWindow that you
> yourself have created *in the same application* that you call this from.
> You can't use this, for example, to get a GtkWidget created in another
> application -- there's no way to do that.
Cou could call gdk_window_foreign_new ;-)
Setting up a GtkWindow around that would be pretty custom though...
Cheers,
-Tristan
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]