Re: How to get GtkWindow associed with XID?
- From: Owen Taylor <otaylor redhat com>
- To: jacktm <jacktm o2 pl>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: How to get GtkWindow associed with XID?
- Date: Sun, 15 May 2005 09:35:18 -0400
On Sun, 2005-05-15 at 13:16 +0200, jacktm wrote:
Hello.
I need do get the GtkWidget associated with XID. I thought
I can do it using gdk_window_foreign_new, but it doesn't
work for me. I tried many things, after googling I found
something like that:
GtkWidget *toplevel = gtk_window_new(GTK_WINDOW_TOPLEVEL);
GdkWindow *gdk_win = gdk_window_foreign_new(xwin);
gtk_widget_set_parent_window(toplevel, gdk_win);
gtk_widget_show(toplevel);
But it creates new window and everything paints in that.
It looks like gtk_widget_set_parent_window doesn't work.
What am I doing wrong? Why doesn't it work for me?
It's not clear what you are trying to do here. GtkWidgets
create their own X windows .... you can't reuse an
existing one.
If you need to embed a GTK+ widget into a non-GTK+
application you'll need to implement the embedder side of
the XEMBED protocol.
http://www.freedesktop.org/Standards/xembed-spec
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]