Re: X11 widget of a gtk window

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

 



John Cupitt wrote:

Hi Thomas,

Thomas Krebs wrote:

I'm using gtk and I need to get the X11 Widget of a window created with
gtk. I can get the GtkWidget by using:
GtkWidget* gtk_widget = GTK_WIDGET(window);

But I need the X11 Widget (the WidgetRec struture) of that window. Is
there a way to access that? Does it exist at all in gtk?


There's no Xt under gtk, so there's no widget to get. You can get the X11 window if that's any help; something like (untested):

#include <gdk/gdkx.h>

Window xid = GDK_WINDOW_XWINDOW( GTK_WIDGET( foo )->window );

Ok, I'm using that and GDK_WINDOW_XDISPLAY for use in a lib that is expecting either a X11 Widget or a X11 Display and a X11 Window, but apparently the Display and Window info I get is not usable: I get: Error: Couldn't find per display information If I create a X11 Widget within the application, take its Window und use its Display and Window everything works fine.

Any help?



[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux