[RFC][PATCH 2/3] Cygwin/X: Fix the rootless extension to build again

Jon TURNEY jon.turney at dronecode.org.uk
Tue Jun 23 10:54:50 PDT 2009


The rootless extension depends on Apple's Xplugin.h for certain typedefs, etc.

This has always been the case, but was previously masked as a problem on Win32
by the fact that a copy of Xplugin.h was included in the X server sources.

This patch does some minimal changes to get the rootless extension to build on
Win32, assuming a copy of Xplugin.h is available.   A more correct way of fixing
this awaits more understanding...

Based on patches from Colin Harrison, Jon Turney and Yaakov Selkowitz

Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
 miext/rootless/rootlessWindow.c |    8 ++++++--
 miext/rootless/rootlessWindow.h |    2 ++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index e273d0e..f3bbd21 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -36,13 +36,13 @@
 #include <stddef.h> /* For NULL */
 #include <limits.h> /* For CHAR_BIT */
 #include <assert.h>
+#include <X11/Xatom.h>
+#include <Xplugin.h>
 #ifdef __APPLE__
 //#include <X11/Xlib.h>
-#include <X11/Xatom.h>
 #include "mi.h"
 #include "pixmapstr.h"
 #include "windowstr.h"
-#include <Xplugin.h>
 //#include <X11/extensions/applewm.h>
 extern int darwinMainScreenX, darwinMainScreenY;
 #endif
@@ -86,9 +86,11 @@ static inline int
 configure_window (xp_window_id id, unsigned int mask,
                   const xp_window_changes *values)
 {
+#ifdef __APPLE__
   if (!no_configure_window)
     return xp_configure_window (id, mask, values);
   else
+#endif
     return XP_Success;
 }
 
@@ -103,6 +105,7 @@ current_time_in_seconds (void)
   return t;
   } */
 
+#ifdef __APPLE__
 void
 RootlessNativeWindowStateChanged (WindowPtr pWin, unsigned int state)
 {
@@ -172,6 +175,7 @@ set_screen_origin (WindowPtr pWin)
   dixChangeWindowProperty(serverClient, pWin, xa_native_screen_origin(),
 			  XA_INTEGER, 32, PropModeReplace, 2, data, TRUE);
 }
+#endif /* __APPLE__ */
 
 /*
  * RootlessCreateWindow
diff --git a/miext/rootless/rootlessWindow.h b/miext/rootless/rootlessWindow.h
index 2d2555e..ca104a4 100644
--- a/miext/rootless/rootlessWindow.h
+++ b/miext/rootless/rootlessWindow.h
@@ -52,7 +52,9 @@ void RootlessResizeWindow(WindowPtr pWin, int x, int y,
 			  unsigned int w, unsigned int h, WindowPtr pSib);
 void RootlessReparentWindow(WindowPtr pWin, WindowPtr pPriorParent);
 void RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width);
+#ifdef __APPLE__
 void RootlessNativeWindowMoved (WindowPtr pWin);
 void RootlessNativeWindowStateChanged (WindowPtr pWin, unsigned int state); 
+#endif
 
 #endif
-- 
1.6.1.2



More information about the xorg-devel mailing list