--- npapi-headers-from-WebCore-r41808/npapi.h.orig	2009-03-19 00:03:16.000000000 +0800
+++ npapi-headers-from-WebCore-r41808/npapi.h	2010-05-05 13:53:32.290273882 +0800
@@ -94,8 +94,10 @@
 #endif
 
 #ifdef XP_UNIX
+#if defined(MOZ_X11)
     #include <X11/Xlib.h>
     #include <X11/Xutil.h>
+#endif
     #include <stdio.h>
 #endif
 
@@ -249,10 +251,12 @@
 typedef struct
 {
     int32           type;
+#ifdef MOZ_X11
     Display*        display;
     Visual*         visual;
     Colormap        colormap;
     unsigned int    depth;
+#endif
 } NPSetWindowCallbackStruct;
 
 typedef struct
@@ -562,7 +566,7 @@
     uint32   wParam;
     uint32   lParam;
 } NPEvent;
-#elif defined (XP_UNIX)
+#elif defined (XP_UNIX) && defined(MOZ_X11)
 typedef XEvent NPEvent;
 #else
 typedef void*            NPEvent;
@@ -583,7 +587,7 @@
 typedef CGPathRef NPCGRegion;
 #elif defined(XP_WIN)
 typedef HRGN NPRegion;
-#elif defined(XP_UNIX)
+#elif defined(XP_UNIX) && defined(MOZ_X11)
 typedef Region NPRegion;
 #else
 typedef void *NPRegion;
