Hi everybody, I have a question about different behavior between Windows and Linux embeddings of Gecko. We are porting our eye-tracked gecko-based browser from Windows to Linux, and I am experiencing some difficulties.
Under Windows, we supply our application native window HWND to Gecko and everything works as expected. But the porting of our stuff under Linux is X/OpenGL-based, while the only real option for Gecko under Linux is GTK. So, I must create a GTK window to get the native handle to pass to the embedded Gecko. This means that, in Linux, I end up with two independent windows (X/OpenGL for our application and GTK for the gecko embedding) while under Windows I have just one main window with the embedded browser acting as a "child" window. Furthermore, nsIBaseWindow::SetVisibility() and nsIBaseWindow::SetEnabled() will not work as expected in Linux: to turn visibility on and off I have to explicitly use gtk_widget_show() on the GTK embedded browser window, and SetEnabled (which I need, read on) seems not to be working. Another trouble is that we use a mouse-based eye-tracker simulator, which is not working under linux: being in a separate window, the embedded browser will "eat" all the mouse messages - while everything works under Windows, where I disable the embedded browser (with SetEnabled()), letting the mouse events "pass thru" and eventually reach our application's events pump. ... yes, I know it is quite a mess... So, apart from asking why SetEnabled seems not to be working under Linux (at least in my embedding), what I am really asking is help to some more GTK experienced people here. Ideally, I would like to build a GTK window sharing the same"resources" of our X/OpenGL app, like the events pump, and then use that GTK native handle to create the embedded Gecko. I know about X -> GDK -> GTK and difference between GtkWindow and GdkWindow; I am trying to create the GTK window from X via gdk_window_foreign_new(), gtk_widget_set_window (), and gtk_widget_set_has_window (), but I don't really know if what I am doing makes sense at all. I have all the code, and it seems correct to me, but it does not behave like I am expecting. It just behaves like an independent window, like it was created with gtk_window_new(). What am I missing? Is there any way to replicate the architecture of our Windows version, or I must start thinking that I WILL HAVE to bear with two separate windows in our Linux porting? Thanks, Aaron/Babele _______________________________________________ dev-embedding mailing list [email protected] https://lists.mozilla.org/listinfo/dev-embedding
