xserver: Branch 'xorg-server-1.4-apple'

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Wed Mar 4 13:38:51 PST 2009


 configure.ac                |    2 +-
 hw/xquartz/applewm.c        |   20 ++++++++++++++++++++
 hw/xquartz/applewmExt.h     |    2 ++
 hw/xquartz/xpr/xprAppleWM.c |    8 ++++++--
 4 files changed, 29 insertions(+), 3 deletions(-)

New commits:
commit 779e9fdc2de9bfebc5f0a4c9d5f42e389fdd8593
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Mar 4 11:33:00 2009 -0800

    XQuartz: Implement SendPSN for AppleWM

diff --git a/configure.ac b/configure.ac
index a52e9ce..b4f2aa3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1688,7 +1688,7 @@ if test "x$XQUARTZ" = xyes; then
 
 	CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA"
 
-	PKG_CHECK_MODULES(XPBPROXY, [applewmproto >= 1.1.1] [applewm >= 1.0.0] xfixes fixesproto x11)
+	PKG_CHECK_MODULES(XPBPROXY, [applewmproto >= 1.2] [applewm >= 1.2] xfixes fixesproto x11)
 
 	if test "x$STANDALONE_XPBPROXY" = xyes ; then
 		AC_DEFINE(STANDALONE_XPBPROXY,1,[Build a standalone xpbproxy])
diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c
index f16c6b4..ae1f876 100644
--- a/hw/xquartz/applewm.c
+++ b/hw/xquartz/applewm.c
@@ -505,6 +505,24 @@ ProcAppleWMSetWindowLevel(register ClientPtr client)
 }
 
 static int
+ProcAppleWMSendPSN(register ClientPtr client)
+{
+    REQUEST(xAppleWMSendPSNReq);
+    int err;
+    
+    REQUEST_SIZE_MATCH(xAppleWMSendPSNReq);
+    
+    if(appleWMProcs->SendPSN) {
+        err = appleWMProcs->SendPSN(stuff->psn_hi, stuff->psn_lo);
+        if (err != Success) {
+            return err;
+        }
+    }
+
+    return (client->noClientException);
+}
+
+static int
 ProcAppleWMSetCanQuit(
     register ClientPtr client
 )
@@ -664,6 +682,8 @@ ProcAppleWMDispatch (
         return ProcAppleWMFrameHitTest(client);
     case X_AppleWMFrameDraw:
         return ProcAppleWMFrameDraw(client);
+    case X_AppleWMSendPSN:
+        return ProcAppleWMSendPSN(client);
     default:
         return BadRequest;
     }
diff --git a/hw/xquartz/applewmExt.h b/hw/xquartz/applewmExt.h
index 60d49ef..3fc3766 100644
--- a/hw/xquartz/applewmExt.h
+++ b/hw/xquartz/applewmExt.h
@@ -45,6 +45,7 @@ typedef int (*FrameDrawProc)(WindowPtr pWin, int class, unsigned int attr,
                              const BoxRec *outer, const BoxRec *inner,
                              unsigned int title_len,
                              const unsigned char *title_bytes);
+typedef int (*SendPSNProc)(uint32_t hi, uint32_t lo);
 
 /*
  * AppleWM implementation function list
@@ -56,6 +57,7 @@ typedef struct _AppleWMProcs {
     FrameGetRectProc FrameGetRect;
     FrameHitTestProc FrameHitTest;
     FrameDrawProc FrameDraw;
+    SendPSNProc SendPSN;
 } AppleWMProcsRec, *AppleWMProcsPtr;
 
 void AppleWMExtensionInit(
diff --git a/hw/xquartz/xpr/xprAppleWM.c b/hw/xquartz/xpr/xprAppleWM.c
index fae9a04..fb50698 100644
--- a/hw/xquartz/xpr/xprAppleWM.c
+++ b/hw/xquartz/xpr/xprAppleWM.c
@@ -104,14 +104,18 @@ static int xprFrameDraw(
     return Success;
 }
 
-
 static AppleWMProcsRec xprAppleWMProcs = {
     xp_disable_update,
     xp_reenable_update,
     xprSetWindowLevel,
     xp_frame_get_rect,
     xp_frame_hit_test,
-    xprFrameDraw
+    xprFrameDraw,
+#if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 2
+    xp_set_dock_proxy
+#else
+    NULL
+#endif
 };
 
 


More information about the xorg-commit mailing list