Hi,
I have a XUL based application I'd like to run on OLPC. The included
"Web activity" doesn't seem to do the trick (it doesn't handle
chrome:// URLs and there doesn't seem to be a way to point it at my
application.ini either), so I tried writing an activity that execs my
xulrunner binary (based on the rgbpaint activity). This does launch
xulrunner, but sugar covers the window with garbage. (launching the
same binary from the command line works perfectly on OLPC).
The next step was trying to implement something like -browserWindow
for xulrunner (I've attached the patch) - this actually gets run and
the window ID looks right, but again, sugar hides the window.
Is there any way to fix it (or even a way to launch a xul application
in the existing version of xulrunner)?
Thanks,
Frank
--- mozilla-1.8/widget/src/gtk2/nsWindow.cpp.ark 2007-04-12 12:22:49.000000000 +0000
+++ mozilla-1.8/widget/src/gtk2/nsWindow.cpp 2007-04-12 12:33:10.000000000 +0000
@@ -92,6 +92,9 @@
#include "nsIGdkPixbufImage.h"
#include "nsIInterfaceRequestorUtils.h"
+#include <stdlib.h>
+static PRBool firstWindow = PR_TRUE;
+
/* utility functions */
static PRBool check_for_rollup(GdkWindow *aWindow,
gdouble aMouseX, gdouble aMouseY,
@@ -2510,7 +2513,16 @@
}
}
else { // must be eWindowType_toplevel
- mShell = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ // The embedding stuff is an _EVIL_ workaround for sugar
+ // seemingly not allowing non-sugar applications. Basically, we have
+ // to make sure the first top level window is integrated with the
+ // sugar window, and do the rest right.
+ char *embedding=getenv("XULRUNNER_EMBED_WINDOW");
+ if(firstWindow && embedding && atoi(embedding)) {
+ firstWindow = PR_FALSE;
+ mShell = gtk_plug_new((GdkNativeWindow)atoi(embedding));
+ } else
+ mShell = gtk_window_new(GTK_WINDOW_TOPLEVEL);
SetDefaultIcon();
// each toplevel window gets its own window group
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://mailman.laptop.org/mailman/listinfo/devel