xserver: Branch 'xorg-server-1.6-apple' - 7 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Tue Aug 25 20:26:36 PDT 2009


 Xext/Makefile.am                    |    1 
 Xext/dpms.c                         |    4 
 Xext/saver.c                        |    3 
 Xext/shape.c                        |    3 
 Xext/shm.c                          |    3 
 Xext/shmint.h                       |   30 +++++-
 Xext/sync.c                         |    5 -
 Xext/syncsrv.h                      |  176 ++++++++++++++++++++++++++++++++++++
 Xext/xtest.c                        |    4 
 Xext/xvdisp.c                       |    3 
 configure.ac                        |    4 
 dbe/dbestruct.h                     |   16 +++
 dix/main.c                          |    3 
 dix/window.c                        |    2 
 hw/xfree86/common/xf86DPMS.c        |    3 
 hw/xfree86/common/xf86Events.c      |    3 
 hw/xfree86/common/xf86Init.c        |    3 
 hw/xfree86/common/xf86Xinput.c      |    3 
 hw/xfree86/dixmods/extmod/modinit.h |   14 +-
 hw/xfree86/fbdevhw/fbdevhw.c        |    3 
 hw/xfree86/modes/xf86Crtc.c         |    3 
 hw/xfree86/modes/xf86Cursors.c      |    3 
 hw/xfree86/modes/xf86Rotate.c       |    3 
 hw/xfree86/vbe/vbe.c                |    3 
 hw/xfree86/vgahw/vgaHW.h            |    3 
 hw/xquartz/X11Application.m         |    3 
 hw/xquartz/X11Controller.h          |   10 ++
 hw/xquartz/X11Controller.m          |   11 --
 hw/xquartz/applewm.c                |    2 
 hw/xquartz/darwin.c                 |    3 
 hw/xquartz/darwinEvents.c           |    3 
 hw/xquartz/quartz.c                 |    2 
 hw/xquartz/xpr/xpr.h                |    3 
 hw/xquartz/xpr/xprAppleWM.c         |    3 
 mi/mieq.c                           |    3 
 mi/miinitext.c                      |    8 -
 mi/miscrinit.c                      |    3 
 os/WaitFor.c                        |    3 
 38 files changed, 271 insertions(+), 87 deletions(-)

New commits:
commit c232ee0e66c06055ecfed837ed9294217d35ca9f
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue Aug 25 20:11:38 2009 -0700

    XQuartz: Use applewmproto 1.4 updated headers.
    (cherry picked from commit 203df06c0eb2dcd5adfa788a1ba9569650c15f9c)

diff --git a/configure.ac b/configure.ac
index a99850b..3ab4553 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1548,7 +1548,7 @@ if test "x$XQUARTZ" = xyes; then
 
 	CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA"
 
-	PKG_CHECK_MODULES(XPBPROXY, [applewmproto >= 1.3] [applewm >= 1.3] xfixes fixesproto x11)
+	PKG_CHECK_MODULES(XPBPROXY, [applewmproto >= 1.4] [applewm >= 1.4] xfixes fixesproto x11)
 
         if test "x$XQUARTZ_SPARKLE" = xyes ; then
                 AC_DEFINE(XQUARTZ_SPARKLE,1,[Support application updating through sparkle.])
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 6ade527..9fb1926 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -41,8 +41,7 @@
 #include "darwinEvents.h"
 #include "quartzKeyboard.h"
 #include "quartz.h"
-#define _APPLEWM_SERVER_
-#include "X11/extensions/applewm.h"
+#include <X11/extensions/applewmconst.h>
 #include "micmap.h"
 #include "exglobals.h"
 
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index 2a533de..f58747e 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -43,8 +43,7 @@
 #include "darwin.h"
 #include "darwinEvents.h"
 #include "quartz.h"
-#define _APPLEWM_SERVER_
-#include "X11/extensions/applewm.h"
+#include <X11/extensions/applewmconst.h>
 #include "applewmExt.h"
 
 #include <stdio.h>
diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c
index 62aa5ab..22d843c 100644
--- a/hw/xquartz/applewm.c
+++ b/hw/xquartz/applewm.c
@@ -49,7 +49,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include <X11/Xatom.h>
 #include "darwin.h"
 #define _APPLEWM_SERVER_
-#include "X11/extensions/applewmstr.h"
+#include <X11/extensions/applewmproto.h>
 #include "applewmExt.h"
 #include "X11Application.h"
 
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index ecd0ed7..453523b 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -68,9 +68,8 @@ in this Software without prior written authorization from The Open Group.
 #define SCROLLWHEELLEFTFAKE  6
 #define SCROLLWHEELRIGHTFAKE 7
 
-#define _APPLEWM_SERVER_
+#include <X11/extensions/applewmconst.h>
 #include "applewmExt.h"
-#include <X11/extensions/applewm.h>
 
 /* FIXME: Abstract this better */
 void QuartzModeEQInit(void);
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index d8bc669..37d7a20 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -45,7 +45,7 @@
 
 #include "X11Application.h"
 
-#include <X11/extensions/applewm.h>
+#include <X11/extensions/applewmconst.h>
 #include <X11/extensions/randr.h>
 
 // X headers
diff --git a/hw/xquartz/xpr/xpr.h b/hw/xquartz/xpr/xpr.h
index b329ca1..c657e15 100644
--- a/hw/xquartz/xpr/xpr.h
+++ b/hw/xquartz/xpr/xpr.h
@@ -53,8 +53,7 @@ void QuartzResumeXCursor(ScreenPtr pScreen, int x, int y);
  * See CGWindowLevel.h
  */
 
-#define _APPLEWM_SERVER_
-#include <X11/extensions/applewm.h>
+#include <X11/extensions/applewmconst.h>
 static const int normal_window_levels[AppleWMNumWindowLevels+1] = {
 0, 3, 4, 5, INT_MIN + 30, INT_MIN + 29,
 };
diff --git a/hw/xquartz/xpr/xprAppleWM.c b/hw/xquartz/xpr/xprAppleWM.c
index 0a25719..4b31e3a 100644
--- a/hw/xquartz/xpr/xprAppleWM.c
+++ b/hw/xquartz/xpr/xprAppleWM.c
@@ -33,8 +33,7 @@
 
 #include "xpr.h"
 
-#define _APPLEWM_SERVER_
-#include <X11/extensions/applewmstr.h>
+#include <X11/extensions/applewmproto.h>
 
 #include "applewmExt.h"
 #include "rootless.h"
commit 697be460d0e555e2c75eed6889293650e02d423c
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Aug 7 00:02:21 2009 -0700

    XQuartz: Use internal xshm header for new xextproto
    (cherry picked from commit 1755239330c0bdac820d88a3e06ff391d65f29be)

diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index d7ce14d..c4da1d8 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -65,8 +65,7 @@
 #include <IOKit/hidsystem/IOHIDLib.h>
 
 #ifdef MITSHM
-#define _XSHM_SERVER_
-#include <X11/extensions/XShm.h>
+#include "shmint.h"
 #endif
 
 #include "darwin.h"
commit 4fc1b920afbab67d75ab1e2cd319351a6cbcca09
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Jul 16 17:43:31 2009 -0400

    dbe: Adapt to new headers
    (cherry picked from commit bb6fa39eb3aa044ffc18632288fd59909ff06344)

diff --git a/dbe/dbestruct.h b/dbe/dbestruct.h
index 641f209..0375a40 100644
--- a/dbe/dbestruct.h
+++ b/dbe/dbestruct.h
@@ -37,10 +37,24 @@
 /* INCLUDES */
 
 #define NEED_DBE_PROTOCOL
-#include <X11/extensions/Xdbeproto.h>
+#include <X11/extensions/dbeproto.h>
 #include "windowstr.h"
 #include "privates.h"
 
+typedef struct
+{
+        VisualID    visual;    /* one visual ID that supports double-buffering */
+            int         depth;     /* depth of visual in bits                      */
+                int         perflevel; /* performance level of visual                  */
+}
+XdbeVisualInfo;
+
+typedef struct
+{
+        int                 count;          /* number of items in visual_depth   */
+            XdbeVisualInfo      *visinfo;       /* list of visuals & depths for scrn */
+}
+XdbeScreenVisualInfo;
 
 /* DEFINES */
 
commit 369326c96d3d800feff5d8b1f2054ab4c9999c6c
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue Aug 25 20:25:55 2009 -0700

    Update to xextproto 7.0.99.1.
    
    xextproto had Xlib client headers moved into libXext.
    Protocol header files are named fooproto.h, header files with constants
    foo.h or fooconst.h where foo.h was already in use for client-side headers.
    (cherry picked from commit d3f6b43a240eb763025b3cbf546cb7ae502c94fa)

diff --git a/Xext/dpms.c b/Xext/dpms.c
index bad7aa6..8bb4fdf 100644
--- a/Xext/dpms.c
+++ b/Xext/dpms.c
@@ -44,9 +44,7 @@ Equipment Corporation.
 #include "dixstruct.h"
 #include "extnsionst.h"
 #include "opaque.h"
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
-#include <X11/extensions/dpmsstr.h>
+#include <X11/extensions/dpmsproto.h>
 #include "dpmsproc.h"
 #include "modinit.h"
 
diff --git a/Xext/saver.c b/Xext/saver.c
index 86db7b0..9de8a10 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -54,8 +54,7 @@ in this Software without prior written authorization from the X Consortium.
 #include "panoramiXsrv.h"
 #endif
 #ifdef DPMSExtension
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 #endif
 
 #include <stdio.h>
diff --git a/Xext/shape.c b/Xext/shape.c
index 332e587..4008498 100644
--- a/Xext/shape.c
+++ b/Xext/shape.c
@@ -43,8 +43,7 @@ in this Software without prior written authorization from The Open Group.
 #include "dixstruct.h"
 #include "resource.h"
 #include "opaque.h"
-#define _SHAPE_SERVER_	/* don't want Xlib structures */
-#include <X11/extensions/shapestr.h>
+#include <X11/extensions/shapeproto.h>
 #include "regionstr.h"
 #include "gcstruct.h"
 #include "modinit.h"
diff --git a/Xext/shm.c b/Xext/shm.c
index a48d2bd..cbc400c 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -54,8 +54,7 @@ in this Software without prior written authorization from The Open Group.
 #include "servermd.h"
 #include "shmint.h"
 #include "xace.h"
-#define _XSHM_SERVER_
-#include <X11/extensions/shmstr.h>
+#include <X11/extensions/shmproto.h>
 #include <X11/Xfuncproto.h>
 
 /* Needed for Solaris cross-zone shared memory extension */
diff --git a/Xext/shmint.h b/Xext/shmint.h
index f659fd2..2baf0aa 100644
--- a/Xext/shmint.h
+++ b/Xext/shmint.h
@@ -23,13 +23,39 @@
 #ifndef _SHMINT_H_
 #define _SHMINT_H_
 
-#define _XSHM_SERVER_
-#include <X11/extensions/shmstr.h>
+#include <X11/extensions/shmproto.h>
 
 #include "screenint.h"
 #include "pixmap.h"
 #include "gc.h"
 
+#define XSHM_PUT_IMAGE_ARGS \
+    DrawablePtr		/* dst */, \
+    GCPtr		/* pGC */, \
+    int			/* depth */, \
+    unsigned int	/* format */, \
+    int			/* w */, \
+    int			/* h */, \
+    int			/* sx */, \
+    int			/* sy */, \
+    int			/* sw */, \
+    int			/* sh */, \
+    int			/* dx */, \
+    int			/* dy */, \
+    char *		/* data */
+
+#define XSHM_CREATE_PIXMAP_ARGS \
+    ScreenPtr	/* pScreen */, \
+    int		/* width */, \
+    int		/* height */, \
+    int		/* depth */, \
+    char *	/* addr */
+
+typedef struct _ShmFuncs {
+    PixmapPtr	(* CreatePixmap)(XSHM_CREATE_PIXMAP_ARGS);
+    void	(* PutImage)(XSHM_PUT_IMAGE_ARGS);
+} ShmFuncs, *ShmFuncsPtr;
+
 void
 ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs);
 
diff --git a/Xext/sync.c b/Xext/sync.c
index 5c6dce0..9ae3c65 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -67,8 +67,7 @@ PERFORMANCE OF THIS SOFTWARE.
 #include "dixstruct.h"
 #include "resource.h"
 #include "opaque.h"
-#include <X11/extensions/sync.h>
-#include <X11/extensions/syncstr.h>
+#include <X11/extensions/syncproto.h>
 #include "syncsrv.h"
 
 #include <stdio.h>
diff --git a/Xext/xtest.c b/Xext/xtest.c
index 9cfe8ca..9fb4be3 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -43,9 +43,7 @@
 #include "dixevents.h"
 #include "sleepuntil.h"
 #include "mi.h"
-#define _XTEST_SERVER_
-#include <X11/extensions/XTest.h>
-#include <X11/extensions/xteststr.h>
+#include <X11/extensions/xtestproto.h>
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
 
diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index de0128e..83daf11 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -42,8 +42,7 @@ SOFTWARE.
 #include <X11/extensions/Xvproto.h>
 #include "xvdix.h"
 #ifdef MITSHM
-#define _XSHM_SERVER_
-#include <X11/extensions/shmstr.h>
+#include <X11/extensions/shmproto.h>
 #endif
 
 #include "xvdisp.h"
diff --git a/configure.ac b/configure.ac
index 35e749f..a99850b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -672,7 +672,7 @@ XEXT_LIB='$(top_builddir)/Xext/libXext.la'
 XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
 
 dnl Core modules for most extensions, et al.
-REQUIRED_MODULES="[randrproto >= 1.2.99.1] [renderproto >= 0.9.3] [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.3] [xproto >= 7.0.13] [xtrans >= 1.2.2] bigreqsproto resourceproto fontsproto [inputproto >= 1.5] [kbproto >= 1.0.3]"
+REQUIRED_MODULES="[randrproto >= 1.2.99.1] [renderproto >= 0.9.3] [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.99.1] [xproto >= 7.0.13] [xtrans >= 1.2.2] bigreqsproto resourceproto fontsproto [inputproto >= 1.5] [kbproto >= 1.0.3]"
 REQUIRED_LIBS="xfont xau fontenc [pixman-1 >= 0.13.2]"
 
 dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas
diff --git a/dix/main.c b/dix/main.c
index 0527621..ecb3566 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -111,8 +111,7 @@ Equipment Corporation.
 #endif
 
 #ifdef DPMSExtension
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 #include "dpmsproc.h"
 #endif
 
diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c
index 5ee5e24..aef1098 100644
--- a/hw/xfree86/common/xf86DPMS.c
+++ b/hw/xfree86/common/xf86DPMS.c
@@ -40,8 +40,7 @@
 #include "xf86.h"
 #include "xf86Priv.h"
 #ifdef DPMSExtension
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 #include "dpmsproc.h"
 #endif
 
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index d6ef93a..5ef3e56 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -82,8 +82,7 @@
 #endif
 
 #ifdef DPMSExtension
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 #include "dpmsproc.h"
 #endif
 
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index f029915..a053fe7 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -83,8 +83,7 @@
 #include "globals.h"
 
 #ifdef DPMSExtension
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 #include "dpmsproc.h"
 #endif
 
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 1f41234..834a142 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -65,8 +65,7 @@
 #include "extinit.h"
 
 #ifdef DPMSExtension
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 #include "dpmsproc.h"
 #endif
 
diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h
index 1de1485..ad53408 100644
--- a/hw/xfree86/dixmods/extmod/modinit.h
+++ b/hw/xfree86/dixmods/extmod/modinit.h
@@ -7,20 +7,16 @@
 #define INITARGS void
 #endif
 
-#define _SHAPE_SERVER_  /* don't want Xlib structures */
-#include <X11/extensions/shapestr.h>
+#include <X11/extensions/shapeproto.h>
 
 #ifdef MULTIBUFFER
 extern void MultibufferExtensionInit(INITARGS);
-#define _MULTIBUF_SERVER_	/* don't want Xlib structures */
-#include <X11/extensions/multibufst.h>
+#include <X11/extensions/multibufproto.h>
 #endif
 
 #ifdef XTEST
 extern void XTestExtensionInit(INITARGS);
-#define _XTEST_SERVER_
-#include <X11/extensions/XTest.h>
-#include <X11/extensions/xteststr.h>
+#include <X11/extensions/xtestproto.h>
 #endif
 
 #if 1
@@ -47,7 +43,7 @@ extern void XFree86DGARegister(INITARGS);
 
 #ifdef DPMSExtension
 extern void DPMSExtensionInit(INITARGS);
-#include <X11/extensions/dpmsstr.h>
+#include <X11/extensions/dpmsconst.h>
 #endif
 
 #ifdef XV
@@ -65,7 +61,7 @@ extern void ResExtensionInit(INITARGS);
 
 #ifdef SHM
 extern void ShmExtensionInit(INITARGS);
-#include <X11/extensions/shmstr.h>
+#include <X11/extensions/shmproto.h>
 extern void ShmRegisterFuncs(
     ScreenPtr pScreen,
     ShmFuncsPtr funcs);
diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index 5269277..2b735be 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -25,8 +25,7 @@
 #endif
 
 #include "globals.h"
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 
 #define DEBUG 0
 
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index e9bde36..117ec9a 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -40,8 +40,7 @@
 #include "xf86Priv.h"
 #include "xf86RandR12.h"
 #include "X11/extensions/render.h"
-#define DPMS_SERVER
-#include "X11/extensions/dpms.h"
+#include "X11/extensions/dpmsconst.h"
 #include "X11/Xatom.h"
 #ifdef RENDER
 #include "picturestr.h"
diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index 3106f05..fe0e1af 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -39,8 +39,7 @@
 #include "xf86RandR12.h"
 #include "xf86CursorPriv.h"
 #include "X11/extensions/render.h"
-#define DPMS_SERVER
-#include "X11/extensions/dpms.h"
+#include "X11/extensions/dpmsconst.h"
 #include "X11/Xatom.h"
 #ifdef RENDER
 #include "picturestr.h"
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 6be77d5..302edac 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -40,8 +40,7 @@
 #include "xf86Modes.h"
 #include "xf86RandR12.h"
 #include "X11/extensions/render.h"
-#define DPMS_SERVER
-#include "X11/extensions/dpms.h"
+#include "X11/extensions/dpmsconst.h"
 #include "X11/Xatom.h"
 
 /* borrowed from composite extension, move to Render and publish? */
diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c
index 4986b5b..26f5911 100644
--- a/hw/xfree86/vbe/vbe.c
+++ b/hw/xfree86/vbe/vbe.c
@@ -18,8 +18,7 @@
 #include "xf86.h"
 #include "vbe.h"
 #include <X11/Xarch.h>
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 
 #define VERSION(x) VBE_VERSION_MAJOR(x),VBE_VERSION_MINOR(x)
 
diff --git a/hw/xfree86/vgahw/vgaHW.h b/hw/xfree86/vgahw/vgaHW.h
index a38ea75..73c0cd0 100644
--- a/hw/xfree86/vgahw/vgaHW.h
+++ b/hw/xfree86/vgahw/vgaHW.h
@@ -25,8 +25,7 @@
 #include "xf86DDC.h"
 
 #include "globals.h"
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 
 extern int vgaHWGetIndex(void);
 
diff --git a/mi/mieq.c b/mi/mieq.c
index e3850d0..c9e6c0c 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -55,8 +55,7 @@ in this Software without prior written authorization from The Open Group.
 
 #ifdef DPMSExtension
 # include "dpmsproc.h"
-# define DPMS_SERVER
-# include <X11/extensions/dpms.h>
+# include <X11/extensions/dpmsconst.h>
 #endif
 
 #define QUEUE_SIZE  512
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 92d6cd2..5fdc07a 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -160,19 +160,17 @@ typedef void (*InitExtension)(INITARGS);
 #endif
 
 #ifdef MITSHM
-#define _XSHM_SERVER_
-#include <X11/extensions/shmstr.h>
+#include <X11/extensions/shm.h>
 #endif
 #ifdef XTEST
-#define _XTEST_SERVER_
-#include <X11/extensions/XTest.h>
+#include <X11/extensions/xtest.h>
 #endif
 #ifdef XKB
 #include <X11/extensions/XKB.h>
 #endif
 #ifdef XCSECURITY
 #include "securitysrv.h"
-#include <X11/extensions/securstr.h>
+#include <X11/extensions/secur.h>
 #endif
 #ifdef XSELINUX
 #include "xselinux.h"
diff --git a/mi/miscrinit.c b/mi/miscrinit.c
index 28d3316..9f595bd 100644
--- a/mi/miscrinit.c
+++ b/mi/miscrinit.c
@@ -39,8 +39,7 @@ from The Open Group.
 #include "dix.h"
 #include "miline.h"
 #ifdef MITSHM
-#define _XSHM_SERVER_
-#include <X11/extensions/XShm.h>
+#include <X11/extensions/shm.h>
 #endif
 
 /* We use this structure to propogate some information from miScreenInit to
diff --git a/os/WaitFor.c b/os/WaitFor.c
index d6dd995..7743ccc 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -109,8 +109,7 @@ mffs(fd_mask mask)
 }
 
 #ifdef DPMSExtension
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 #endif
 
 struct _OsTimerRec {
commit 3af4b6fe23aeca468ba4e339f56c8346fb6134ec
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Dec 10 13:32:04 2008 -0500

    xsync: Use a local header for server API definitions
    (cherry picked from commit e0d8f6a8084a3fe6c549c1dee11e4502e316c382)

diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index 2f5c98b..59604fd 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -26,6 +26,7 @@ BUILTIN_SRCS =			\
 	sleepuntil.c		\
 	sleepuntil.h		\
 	sync.c			\
+	syncsrv.h		\
 	xcmisc.c		\
 	xtest.c
 
diff --git a/Xext/sync.c b/Xext/sync.c
index 424361e..5c6dce0 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -67,9 +67,9 @@ PERFORMANCE OF THIS SOFTWARE.
 #include "dixstruct.h"
 #include "resource.h"
 #include "opaque.h"
-#define _SYNC_SERVER
 #include <X11/extensions/sync.h>
 #include <X11/extensions/syncstr.h>
+#include "syncsrv.h"
 
 #include <stdio.h>
 #if !defined(WIN32)
diff --git a/Xext/syncsrv.h b/Xext/syncsrv.h
new file mode 100644
index 0000000..93f6b9d
--- /dev/null
+++ b/Xext/syncsrv.h
@@ -0,0 +1,176 @@
+/*
+
+Copyright 1991, 1993, 1994, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+/***********************************************************
+Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts,
+and Olivetti Research Limited, Cambridge, England.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the names of Digital or Olivetti
+not be used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL THEY BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+******************************************************************/
+
+#ifndef _SYNCSTR_H_
+#define _SYNCSTR_H_
+
+#define CARD64 XSyncValue /* XXX temporary! need real 64 bit values for Alpha */
+
+typedef struct _SyncCounter {
+    ClientPtr		client;	/* Owning client. 0 for system counters */
+    XSyncCounter	id;		/* resource ID */
+    CARD64		value;		/* counter value */
+    struct _SyncTriggerList *pTriglist;	/* list of triggers */
+    Bool		beingDestroyed; /* in process of going away */
+    struct _SysCounterInfo *pSysCounterInfo; /* NULL if not a system counter */
+} SyncCounter;
+
+/*
+ * The System Counter interface
+ */
+
+typedef enum {
+    XSyncCounterNeverChanges,
+    XSyncCounterNeverIncreases,
+    XSyncCounterNeverDecreases,
+    XSyncCounterUnrestricted
+} SyncCounterType;
+
+typedef struct _SysCounterInfo {
+    char	*name;
+    CARD64	resolution;
+    CARD64	bracket_greater;
+    CARD64	bracket_less;
+    SyncCounterType counterType;  /* how can this counter change */
+    void        (*QueryValue)(
+			      pointer /*pCounter*/,
+			      CARD64 * /*freshvalue*/
+);
+    void	(*BracketValues)(
+				 pointer /*pCounter*/,
+				 CARD64 * /*lessthan*/,
+				 CARD64 * /*greaterthan*/
+);
+} SysCounterInfo;
+
+
+
+typedef struct _SyncTrigger {
+    SyncCounter *pCounter;
+    CARD64	wait_value;	/* wait value */
+    unsigned int value_type;     /* Absolute or Relative */
+    unsigned int test_type;	/* transition or Comparision type */
+    CARD64	test_value;	/* trigger event threshold value */
+    Bool	(*CheckTrigger)(
+				struct _SyncTrigger * /*pTrigger*/,
+				CARD64 /*newval*/
+				);
+    void	(*TriggerFired)(
+				struct _SyncTrigger * /*pTrigger*/
+				);
+    void	(*CounterDestroyed)(
+				struct _SyncTrigger * /*pTrigger*/
+				    );
+} SyncTrigger;
+
+typedef struct _SyncTriggerList {
+    SyncTrigger *pTrigger;
+    struct _SyncTriggerList *next;
+} SyncTriggerList;
+
+typedef struct _SyncAlarmClientList {
+    ClientPtr	client;
+    XID		delete_id;
+    struct _SyncAlarmClientList *next;
+} SyncAlarmClientList;
+
+typedef struct _SyncAlarm {
+    SyncTrigger trigger;
+    ClientPtr	client;
+    XSyncAlarm 	alarm_id;
+    CARD64	delta;
+    int		events;
+    int		state;
+    SyncAlarmClientList *pEventClients;
+} SyncAlarm;
+
+typedef struct {
+    ClientPtr	client;
+    CARD32 	delete_id;
+    int		num_waitconditions;
+} SyncAwaitHeader;
+
+typedef struct {
+    SyncTrigger trigger;
+    CARD64	event_threshold;
+    SyncAwaitHeader *pHeader;
+} SyncAwait;
+
+typedef union {
+    SyncAwaitHeader header;
+    SyncAwait	    await;
+} SyncAwaitUnion;
+
+
+extern pointer SyncCreateSystemCounter(
+    char *	/* name */,
+    CARD64  	/* inital_value */,
+    CARD64  	/* resolution */,
+    SyncCounterType /* change characterization */,
+    void        (* /*QueryValue*/ ) (
+        pointer /* pCounter */,
+        CARD64 * /* pValue_return */), /* XXX prototype */
+    void        (* /*BracketValues*/) (
+        pointer /* pCounter */, 
+        CARD64 * /* pbracket_less */,
+        CARD64 * /* pbracket_greater */)
+);
+
+extern void SyncChangeCounter(
+    SyncCounter *	/* pCounter*/,
+    CARD64  		/* new_value */
+);
+
+extern void SyncDestroySystemCounter(
+    pointer pCounter
+);
+extern void InitServertime(void);
+
+#endif /* _SYNCSTR_H_ */
commit c46bfe10bf718f21d6d7d4f2e3da633c272a3018
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Sun Aug 9 16:13:32 2009 -0700

    XQuartz: Check NSINTEGER_DEFINED to make sure the NSInteger and NSUInteger types are defined.
    (cherry picked from commit 36e02a8649c0a545084cce5fb2c5717277b9273c)

diff --git a/hw/xquartz/X11Controller.h b/hw/xquartz/X11Controller.h
index 170bccc..a86b20f 100644
--- a/hw/xquartz/X11Controller.h
+++ b/hw/xquartz/X11Controller.h
@@ -45,6 +45,16 @@
 #undef BOOL
 #endif
 
+#ifndef NSINTEGER_DEFINED
+#if __LP64__ || NS_BUILD_32_LIKE_64
+typedef long NSInteger;
+typedef unsigned long NSUInteger;
+#else
+typedef int NSInteger;
+typedef unsigned int NSUInteger;
+#endif
+#endif
+
 @interface X11Controller : NSObject
 {
     IBOutlet NSPanel *prefs_panel;
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index 9900537..2a533de 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -164,11 +164,7 @@ BOOL xquartz_resetenv_display = NO;
 
       item = (NSMenuItem *) [menu addItemWithTitle:name action:@selector
 				  (item_selected:) keyEquivalent:shortcut];
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
       [item setKeyEquivalentModifierMask:(NSUInteger) windowItemModMask];
-#else
-      [item setKeyEquivalentModifierMask:windowItemModMask];
-#endif
       [item setTarget:self];
       [item setTag:i];
       [item setEnabled:YES];
@@ -177,11 +173,7 @@ BOOL xquartz_resetenv_display = NO;
 				       action:@selector
 				       (item_selected:) keyEquivalent:shortcut
 				       atIndex:i];
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
       [item setKeyEquivalentModifierMask:(NSUInteger) windowItemModMask];
-#else
-      [item setKeyEquivalentModifierMask:windowItemModMask];
-#endif
       [item setTarget:self];
       [item setTag:i];
       [item setEnabled:YES];
commit 238d280f85b0086bdf214fa2edfab59464f3db08
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Aug 5 17:43:29 2009 -0700

    CheckWindowOptionalNeed: Ensure w->optional is set to avoid SEGFAULT
    
    If CheckWindowOptionalNeed is called consecutively (and the first removes optional), then
    we will SEGFAULT.  This can happen in XQuartz because ReparentWindow will call
    pScreen->ReparentWindow which can DeleteProperty which will CheckWindowOptionalNeed... then
    ReparentWindow will call it again later indiscriminantly.
    (cherry picked from commit b608c864ccc59628bd33c033393121b61580460e)

diff --git a/dix/window.c b/dix/window.c
index a9d00f9..2a2fb18 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -3429,7 +3429,7 @@ CheckWindowOptionalNeed (WindowPtr w)
     WindowOptPtr optional;
     WindowOptPtr parentOptional;
 
-    if (!w->parent)
+    if (!w->parent || !w->optional)
 	return;
     optional = w->optional;
     if (optional->dontPropagateMask != DontPropagateMasks[w->dontPropagate])


More information about the xorg-commit mailing list