Re: X11 widget of a gtk window
- From: Thomas Krebs <Thomas_Krebs gmx de>
- To: gtk-list gnome org
- Subject: Re: X11 widget of a gtk window
- Date: Wed, 04 Jun 2003 16:44:59 +0200
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?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]