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

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Fri Jul 3 19:58:17 PDT 2009


 configure.ac                     |    4 ++--
 hw/xquartz/applewm.c             |   32 ++++++++++++++++++++++++++++++++
 hw/xquartz/applewmExt.h          |    2 ++
 hw/xquartz/bundle/Info.plist.cpp |    4 ++--
 hw/xquartz/xpr/xprAppleWM.c      |   37 +++++++++++++++++++++++++++++++++++--
 5 files changed, 73 insertions(+), 6 deletions(-)

New commits:
commit 0fbbc0cf76844b127e5e73745b92ad0b396510f2
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Jul 3 19:47:31 2009 -0700

    1.4.2-apple45

diff --git a/configure.ac b/configure.ac
index a4f261b..76a360b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.4.2-apple44, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+AC_INIT([xorg-server], 1.4.2-apple45, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 AM_MAINTAINER_MODE
commit f5df8081edd6cf1053e9633353868f415f1544e9
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Jul 3 19:47:06 2009 -0700

    XQuartz Bundle version 2.3.4

diff --git a/hw/xquartz/bundle/Info.plist.cpp b/hw/xquartz/bundle/Info.plist.cpp
index 7f9f43f..3551ee0 100644
--- a/hw/xquartz/bundle/Info.plist.cpp
+++ b/hw/xquartz/bundle/Info.plist.cpp
@@ -19,9 +19,9 @@
 	<key>CFBundlePackageType</key>
 		<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-		<string>2.3.3</string>
+		<string>2.3.4</string>
 	<key>CFBundleVersion</key>
-		<string>2.3.3</string>
+		<string>2.3.4</string>
 	<key>CFBundleSignature</key>
 		<string>x11a</string>
 	<key>CSResourcesFileMapped</key>
commit 032bdd1faa4bdc212278fc5e0031f71fc1e05e69
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Jul 3 19:25:33 2009 -0700

    XQuartz: ProcAppleWMAttachTransient to play nice with the new Dock in SL
    (cherry picked from commit ddc0242d8f291d0f961ba9aa8c883e39861ce2ad)

diff --git a/configure.ac b/configure.ac
index 94b17fa..a4f261b 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.2] [applewm >= 1.2] xfixes fixesproto x11)
+	PKG_CHECK_MODULES(XPBPROXY, [applewmproto >= 1.3] [applewm >= 1.3] 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 cbb1f15..60eae71 100644
--- a/hw/xquartz/applewm.c
+++ b/hw/xquartz/applewm.c
@@ -524,6 +524,36 @@ ProcAppleWMSendPSN(register ClientPtr client)
 }
 
 static int
+ProcAppleWMAttachTransient(register ClientPtr client)
+{
+    WindowPtr pWinChild, pWinParent;
+    REQUEST(xAppleWMAttachTransientReq);
+    int err;
+    
+    REQUEST_SIZE_MATCH(xAppleWMAttachTransientReq);
+    
+    if(!appleWMProcs->AttachTransient)
+        return BadRequest;
+
+    if (Success != dixLookupWindow(&pWinChild, stuff->child, client, DixReadAccess))
+        return BadValue;
+
+    if(stuff->parent) {
+        if(Success != dixLookupWindow(&pWinParent, stuff->parent, client, DixReadAccess))
+            return BadValue;
+    } else {
+        pWinParent = NULL;
+    }
+
+    err = appleWMProcs->AttachTransient(pWinChild, pWinParent);
+    if (err != Success) {
+        return err;
+    }
+
+    return (client->noClientException);
+}
+
+static int
 ProcAppleWMSetCanQuit(
     register ClientPtr client
 )
@@ -685,6 +715,8 @@ ProcAppleWMDispatch (
         return ProcAppleWMFrameDraw(client);
     case X_AppleWMSendPSN:
         return ProcAppleWMSendPSN(client);
+    case X_AppleWMAttachTransient:
+        return ProcAppleWMAttachTransient(client);
     default:
         return BadRequest;
     }
diff --git a/hw/xquartz/applewmExt.h b/hw/xquartz/applewmExt.h
index 3fc3766..5ef8b54 100644
--- a/hw/xquartz/applewmExt.h
+++ b/hw/xquartz/applewmExt.h
@@ -46,6 +46,7 @@ typedef int (*FrameDrawProc)(WindowPtr pWin, int class, unsigned int attr,
                              unsigned int title_len,
                              const unsigned char *title_bytes);
 typedef int (*SendPSNProc)(uint32_t hi, uint32_t lo);
+typedef int (*AttachTransientProc)(WindowPtr pWinChild, WindowPtr pWinParent);
 
 /*
  * AppleWM implementation function list
@@ -58,6 +59,7 @@ typedef struct _AppleWMProcs {
     FrameHitTestProc FrameHitTest;
     FrameDrawProc FrameDraw;
     SendPSNProc SendPSN;
+    AttachTransientProc AttachTransient;
 } AppleWMProcsRec, *AppleWMProcsPtr;
 
 void AppleWMExtensionInit(
diff --git a/hw/xquartz/xpr/xprAppleWM.c b/hw/xquartz/xpr/xprAppleWM.c
index 9c44e20..0a25719 100644
--- a/hw/xquartz/xpr/xprAppleWM.c
+++ b/hw/xquartz/xpr/xprAppleWM.c
@@ -82,6 +82,34 @@ static int xprSetWindowLevel(
     return Success;
 }
 
+#if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 3
+static int xprAttachTransient(WindowPtr pWinChild, WindowPtr pWinParent) {
+    xp_window_id child_wid, parent_wid; 
+    xp_window_changes wc;
+
+    child_wid = x_cvt_vptr_to_uint(RootlessFrameForWindow(pWinChild, TRUE));
+    if (child_wid == 0)
+        return BadWindow;
+
+    if(pWinParent) {
+        parent_wid = x_cvt_vptr_to_uint(RootlessFrameForWindow(pWinParent, TRUE));
+        if (parent_wid == 0)
+            return BadWindow;
+    } else {
+        parent_wid = 0;
+    }
+     
+    wc.transient_for = parent_wid;
+
+    RootlessStopDrawing (pWinChild, FALSE);
+
+    if (xp_configure_window(child_wid, XP_ATTACH_TRANSIENT, &wc) != Success) {
+        return BadValue;
+    }
+
+    return Success;    
+}
+#endif
 
 static int xprFrameDraw(
     WindowPtr pWin,
@@ -114,9 +142,14 @@ static AppleWMProcsRec xprAppleWMProcs = {
     xp_frame_get_rect,
     xp_frame_hit_test,
     xprFrameDraw,
-#if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 2
-    xp_set_dock_proxy
+#if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 3
+    xp_set_dock_proxy,
+    xprAttachTransient
+#elif defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 2
+    xp_set_dock_proxy,
+    NULL
 #else
+    NULL,
     NULL
 #endif
 };


More information about the xorg-commit mailing list