Linux followup to bug 583053 - fix the include ordering so that KeyPress is defined at the time we need it.
authorBenjamin Smedberg <benjamin@smedbergs.us>
Mon, 16 Aug 2010 11:41:46 -0400
changeset 50669 d233936ab3143cd28294c2952960522afcb79ed6
parent 50668 f52342744bda11892aecff44ce6fc9368e97da3b
child 50670 099d6c0a511cd9eb2a0cfe1ced02632ace4d7919
push idunknown
push userunknown
push dateunknown
bugs583053
milestone2.0b4pre
Linux followup to bug 583053 - fix the include ordering so that KeyPress is defined at the time we need it.
layout/generic/nsObjectFrame.cpp
--- a/layout/generic/nsObjectFrame.cpp
+++ b/layout/generic/nsObjectFrame.cpp
@@ -45,16 +45,25 @@
  * ***** END LICENSE BLOCK ***** */
 
 /* rendering objects for replaced elements implemented by a plugin */
 
 #ifdef MOZ_IPC
 #include "mozilla/plugins/PluginMessageUtils.h"
 #endif
 
+#ifdef MOZ_X11
+#include <cairo-xlib.h>
+#include "gfxXlibSurface.h"
+/* X headers suck */
+enum { XKeyPress = KeyPress };
+#ifdef KeyPress
+#undef KeyPress
+#endif
+
 #ifdef MOZ_WIDGET_QT
 #include <QWidget>
 #include <QKeyEvent>
 #ifdef MOZ_X11
 #include <QX11Info>
 #endif
 #endif
 
@@ -167,25 +176,16 @@ static NS_DEFINE_CID(kRangeCID, NS_RANGE
 static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
 
 #ifdef XP_MACOSX
 #include "gfxQuartzNativeDrawing.h"
 #include "nsPluginUtilsOSX.h"
 #include "nsCoreAnimationSupport.h"
 #endif
 
-#ifdef MOZ_X11
-#include <cairo-xlib.h>
-#include "gfxXlibSurface.h"
-/* X headers suck */
-enum { XKeyPress = KeyPress };
-#ifdef KeyPress
-#undef KeyPress
-#endif
-
 #if (MOZ_PLATFORM_MAEMO == 5) && defined(MOZ_WIDGET_GTK2)
 #define MOZ_COMPOSITED_PLUGINS 1
 #define MOZ_USE_IMAGE_EXPOSE   1
 #include <X11/Xutil.h>
 #include <X11/Xatom.h>
 #include <X11/extensions/XShm.h>
 #include <sys/ipc.h>
 #include <sys/shm.h>