Re: Receiving a callback on GDK window destroy

2010-01-20 Thread Tristan Schmelcher
I do get one XID per instance, but that XID is created by Firefox's plugin host code in GtkSocket's internal GdkWindow. So the XID is already mapped to that GdkWindow by the time NPP_SetWindow runs, hence gdk_window_foreign_new() just returns a pointer to that pre-existing GdkWindow, so the parenta

Re: Receiving a callback on GDK window destroy

2010-01-19 Thread Kevin DeKorte
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/19/10 20:29, Tristan Schmelcher wrote: > Actually, after debugging and looking at the code, it seems that > gdk_window_foreign_new() first looks up if there is already a GdkWindow > for that XID and re-uses it if so (gdk/x11/gdkwindow-x11.c:1008)

Re: Receiving a callback on GDK window destroy

2010-01-19 Thread Kevin DeKorte
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/19/10 20:09, Tristan Schmelcher wrote: > Thanks Kevin! I'm trying out your suggestion and I've got the GtkWindow > hooking up to the foreign GdkWindow properly, but it looks like I still > get the same X server error when trying to draw after the

Re: Receiving a callback on GDK window destroy

2010-01-19 Thread Tristan Schmelcher
Actually, after debugging and looking at the code, it seems that gdk_window_foreign_new() first looks up if there is already a GdkWindow for that XID and re-uses it if so (gdk/x11/gdkwindow-x11.c:1008). So I don't think this approach will work. :( On 19 January 2010 19:09, Tristan Schmelcher wrot

Re: Receiving a callback on GDK window destroy

2010-01-19 Thread Tristan Schmelcher
Thanks Kevin! I'm trying out your suggestion and I've got the GtkWindow hooking up to the foreign GdkWindow properly, but it looks like I still get the same X server error when trying to draw after the browser destroys the GtkSocket's window, and I still can't find a signal/event that gets dispatch

Re: Receiving a callback on GDK window destroy

2010-01-16 Thread David Nečas
On Fri, Jan 15, 2010 at 11:51:38PM +, Tristan Schmelcher wrote: > I'm a novice Gtk app developer writing a plugin for Firefox and I'm > having trouble getting the callbacks that I need from Gtk/Gdk. The way > the plugin architecture works is that Firefox creates a GtkSocket and > my plugin gets

Re: Receiving a callback on GDK window destroy

2010-01-15 Thread Kevin DeKorte
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/15/10 16:51, Tristan Schmelcher wrote: > Hello, > > I'm a novice Gtk app developer writing a plugin for Firefox and I'm > having trouble getting the callbacks that I need from Gtk/Gdk. The way > the plugin architecture works is that Firefox crea

Receiving a callback on GDK window destroy

2010-01-15 Thread Tristan Schmelcher
Hello, I'm a novice Gtk app developer writing a plugin for Firefox and I'm having trouble getting the callbacks that I need from Gtk/Gdk. The way the plugin architecture works is that Firefox creates a GtkSocket and my plugin gets passed its XID and creates the corresponding GtkPlug (in the same p