XQuartz: Implement SendPSN for AppleWM

(cherry picked from commit 779e9fdc2d)
This commit is contained in:
Jeremy Huddleston 2009-03-04 11:33:00 -08:00
parent ce6e1771be
commit daa9727a02
4 changed files with 29 additions and 3 deletions

View File

@ -1634,7 +1634,7 @@ if test "x$XQUARTZ" = xyes; then
CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -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])

View File

@ -492,6 +492,24 @@ ProcAppleWMSetWindowLevel(register ClientPtr client)
return (client->noClientException);
}
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
@ -652,6 +670,8 @@ ProcAppleWMDispatch (
return ProcAppleWMFrameHitTest(client);
case X_AppleWMFrameDraw:
return ProcAppleWMFrameDraw(client);
case X_AppleWMSendPSN:
return ProcAppleWMSendPSN(client);
default:
return BadRequest;
}

View File

@ -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(

View File

@ -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
};