[Offscreengecko-commits] SF.net SVN: offscreengecko:[103] trunk
Status: Pre-Alpha
Brought to you by:
res2002
|
From: <re...@us...> - 2008-11-10 23:48:28
|
Revision: 103
http://offscreengecko.svn.sourceforge.net/offscreengecko/?rev=103&view=rev
Author: res2002
Date: 2008-11-10 23:48:25 +0000 (Mon, 10 Nov 2008)
Log Message:
-----------
Pump messages on Win32 in ProcessToolkitEvents()
Modified Paths:
--------------
trunk/sdk/win32/README.txt
trunk/src/libosgk/browser.cpp
Modified: trunk/sdk/win32/README.txt
===================================================================
--- trunk/sdk/win32/README.txt 2008-11-10 23:47:07 UTC (rev 102)
+++ trunk/sdk/win32/README.txt 2008-11-10 23:48:25 UTC (rev 103)
@@ -7,6 +7,3 @@
You will either have to give the directory with the XULrunner binaries as
an additional path to search for XULrunner to OffscreenGecko (see API docs)
or set the GRE_HOME variable to that directory.
-
-The embedding application must regularly pump messages to all Windows. (This
-is usually the case.)
Modified: trunk/src/libosgk/browser.cpp
===================================================================
--- trunk/src/libosgk/browser.cpp 2008-11-10 23:47:07 UTC (rev 102)
+++ trunk/src/libosgk/browser.cpp 2008-11-10 23:48:25 UTC (rev 103)
@@ -89,9 +89,9 @@
#include GECKO_INCLUDE(dom,nsIDOMDocument.h)
#include GECKO_INCLUDE(dom,nsIDOMWindow.h)
#include GECKO_INCLUDE(embed_base,nsEmbedCID.h)
-#include GECKO_INCLUDE(generic,nsHTMLReflowState.h)
#include GECKO_INCLUDE(layout,nsIDocumentViewer.h)
#include GECKO_INCLUDE(layout,nsIFrame.h)
+#include GECKO_INCLUDE(layout,nsHTMLReflowState.h)
#include GECKO_INCLUDE(layout,nsPresContext.h)
#include GECKO_INCLUDE(webbrwsr,nsIWebBrowserSetup.h)
#include GECKO_INCLUDE(widget,nsIWidget.h)
@@ -105,6 +105,13 @@
#include "gtk/gtk.h"
#endif
+#ifdef WIN32
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#include <windows.h>
+#endif
+
/* Depends on whether a modification I made to gecko makes it into the source -
see https://bugzilla.mozilla.org/show_bug.cgi?id=407531 */
//#define HAVE_GECKO_AA_GRAY
@@ -333,6 +340,18 @@
{
#ifdef MOZ_WIDGET_GTK2
gtk_main_iteration_do (FALSE);
+ #elif defined(WIN32)
+ MSG msg;
+ while (PeekMessage (&msg, 0, 0, 0, PM_NOREMOVE))
+ {
+ // Make sure that WM_QUIT is passed back to the host app
+ if (msg.message == WM_QUIT) return;
+ if (GetMessage (&msg, 0, 0, 0) >= 0)
+ {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ }
#endif
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|