aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xquartz/xpr
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-10-05 15:13:41 +0000
committermarha <marha@users.sourceforge.net>2009-10-05 15:13:41 +0000
commit78db264e7992131e0781bdfa5ede821305262b2d (patch)
tree7461ae9dab5bf69f056250fc233c1ada393dc957 /xorg-server/hw/xquartz/xpr
parent1d2fa791e7eb383cf2818bb2e33da546edbeade9 (diff)
parent77a4732b0637493966889fe3545966fdc12a1b5e (diff)
downloadvcxsrv-78db264e7992131e0781bdfa5ede821305262b2d.tar.gz
vcxsrv-78db264e7992131e0781bdfa5ede821305262b2d.tar.bz2
vcxsrv-78db264e7992131e0781bdfa5ede821305262b2d.zip
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/hw/xquartz/xpr')
-rw-r--r--xorg-server/hw/xquartz/xpr/appledri.c2
-rw-r--r--xorg-server/hw/xquartz/xpr/x-hash.h2
-rw-r--r--xorg-server/hw/xquartz/xpr/xpr.h2
-rw-r--r--xorg-server/hw/xquartz/xpr/xprCursor.c4
-rw-r--r--xorg-server/hw/xquartz/xpr/xprEvent.c49
-rw-r--r--xorg-server/hw/xquartz/xpr/xprEvent.h2
-rw-r--r--xorg-server/hw/xquartz/xpr/xprFrame.c8
-rw-r--r--xorg-server/hw/xquartz/xpr/xprScreen.c4
8 files changed, 32 insertions, 41 deletions
diff --git a/xorg-server/hw/xquartz/xpr/appledri.c b/xorg-server/hw/xquartz/xpr/appledri.c
index 835ccabaf..74a4ec315 100644
--- a/xorg-server/hw/xquartz/xpr/appledri.c
+++ b/xorg-server/hw/xquartz/xpr/appledri.c
@@ -255,10 +255,10 @@ ProcAppleDRIDestroySurface(
register ClientPtr client
)
{
+ int rc;
REQUEST(xAppleDRIDestroySurfaceReq);
DrawablePtr pDrawable;
REQUEST_SIZE_MATCH(xAppleDRIDestroySurfaceReq);
- int rc;
rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0,
DixReadAccess);
diff --git a/xorg-server/hw/xquartz/xpr/x-hash.h b/xorg-server/hw/xquartz/xpr/x-hash.h
index 78bc7b317..f876b6b71 100644
--- a/xorg-server/hw/xquartz/xpr/x-hash.h
+++ b/xorg-server/hw/xquartz/xpr/x-hash.h
@@ -72,7 +72,7 @@ X_PFX (cvt_vptr_to_uint) (void * val) __attribute__((always_inline));
static __inline__ void *
X_PFX (cvt_uint_to_vptr) (unsigned int val)
{
- return (void*)((size_t)(val));
+ return (void*)((unsigned long)(val));
}
static __inline__ unsigned int
diff --git a/xorg-server/hw/xquartz/xpr/xpr.h b/xorg-server/hw/xquartz/xpr/xpr.h
index c657e1586..af1a90ca0 100644
--- a/xorg-server/hw/xquartz/xpr/xpr.h
+++ b/xorg-server/hw/xquartz/xpr/xpr.h
@@ -45,7 +45,7 @@ void xprHideWindows(Bool hide);
Bool QuartzInitCursor(ScreenPtr pScreen);
void QuartzSuspendXCursor(ScreenPtr pScreen);
-void QuartzResumeXCursor(ScreenPtr pScreen, int x, int y);
+void QuartzResumeXCursor(ScreenPtr pScreen);
/* If we are rooted, we need the root window and desktop levels to be below
* the menubar (24) but above native windows. Normal window level is 0.
diff --git a/xorg-server/hw/xquartz/xpr/xprCursor.c b/xorg-server/hw/xquartz/xpr/xprCursor.c
index 8c47b671c..b577fc099 100644
--- a/xorg-server/hw/xquartz/xpr/xprCursor.c
+++ b/xorg-server/hw/xquartz/xpr/xprCursor.c
@@ -392,7 +392,7 @@ QuartzSuspendXCursor(ScreenPtr pScreen)
* X server is showing. Restore the X cursor.
*/
void
-QuartzResumeXCursor(ScreenPtr pScreen, int x, int y)
+QuartzResumeXCursor(ScreenPtr pScreen)
{
WindowPtr pWin;
CursorPtr pCursor;
@@ -407,5 +407,5 @@ QuartzResumeXCursor(ScreenPtr pScreen, int x, int y)
if (pCursor == NULL)
return;
- QuartzSetCursor(darwinPointer, pScreen, pCursor, x, y);
+ QuartzSetCursor(darwinPointer, pScreen, pCursor, /* x */ 0, /* y */ 0);
}
diff --git a/xorg-server/hw/xquartz/xpr/xprEvent.c b/xorg-server/hw/xquartz/xpr/xprEvent.c
index f8e985aba..6245cce42 100644
--- a/xorg-server/hw/xquartz/xpr/xprEvent.c
+++ b/xorg-server/hw/xquartz/xpr/xprEvent.c
@@ -39,6 +39,7 @@
#include "windowstr.h"
#include "pixmapstr.h"
#include "inputstr.h"
+#include "eventstr.h"
#include "mi.h"
#include "scrnintstr.h"
#include "mipointer.h"
@@ -55,36 +56,26 @@
#include "rootlessWindow.h"
#include "xprEvent.h"
-static void xprEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents) {
- int i;
-
+Bool QuartzModeEventHandler(int screenNum, XQuartzEvent *e, DeviceIntPtr dev) {
TA_SERVER();
- DEBUG_LOG("DarwinEventHandler(%d, %p, %p, %d)\n", screenNum, xe, dev, nevents);
- for (i=0; i<nevents; i++) {
- switch(xe[i].u.u.type) {
-
- case kXquartzWindowState:
- DEBUG_LOG("kXquartzWindowState\n");
- RootlessNativeWindowStateChanged(xprGetXWindow(xe[i].u.clientMessage.u.l.longs0),
- xe[i].u.clientMessage.u.l.longs1);
- break;
-
- case kXquartzWindowMoved:
- DEBUG_LOG("kXquartzWindowMoved\n");
- RootlessNativeWindowMoved(xprGetXWindow(xe[i].u.clientMessage.u.l.longs0));
- break;
-
- case kXquartzBringAllToFront:
- DEBUG_LOG("kXquartzBringAllToFront\n");
- RootlessOrderAllWindows();
- break;
- }
+ switch(e->subtype) {
+ case kXquartzWindowState:
+ DEBUG_LOG("kXquartzWindowState\n");
+ RootlessNativeWindowStateChanged(xprGetXWindow(e->data[0]),
+ e->data[1]);
+ return TRUE;
+
+ case kXquartzWindowMoved:
+ DEBUG_LOG("kXquartzWindowMoved\n");
+ RootlessNativeWindowMoved(xprGetXWindow(e->data[0]));
+ return TRUE;
+
+ case kXquartzBringAllToFront:
+ DEBUG_LOG("kXquartzBringAllToFront\n");
+ RootlessOrderAllWindows();
+ return TRUE;
+ default:
+ return FALSE;
}
}
-
-void QuartzModeEQInit(void) {
- mieqSetHandler(kXquartzWindowState, xprEventHandler);
- mieqSetHandler(kXquartzWindowMoved, xprEventHandler);
- mieqSetHandler(kXquartzBringAllToFront, xprEventHandler);
-}
diff --git a/xorg-server/hw/xquartz/xpr/xprEvent.h b/xorg-server/hw/xquartz/xpr/xprEvent.h
index 5af9dfd77..ebfa36bd8 100644
--- a/xorg-server/hw/xquartz/xpr/xprEvent.h
+++ b/xorg-server/hw/xquartz/xpr/xprEvent.h
@@ -29,6 +29,6 @@
#ifndef __XPR_EVENT_H__
#define __XPR_EVENT_H__
-void QuartzModeEQInit(void);
+Bool QuartzModeEventHandler(int screenNum, XQuartzEvent *e, DeviceIntPtr dev);
#endif
diff --git a/xorg-server/hw/xquartz/xpr/xprFrame.c b/xorg-server/hw/xquartz/xpr/xprFrame.c
index 6635f08d8..a3e207616 100644
--- a/xorg-server/hw/xquartz/xpr/xprFrame.c
+++ b/xorg-server/hw/xquartz/xpr/xprFrame.c
@@ -215,10 +215,10 @@ xprDestroyFrame(RootlessFrameID wid)
static void
xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY)
{
- TA_SERVER();
-
xp_window_changes wc;
+ TA_SERVER();
+
wc.x = newX;
wc.y = newY;
// ErrorF("xprMoveFrame(%d, %p, %d, %d)\n", wid, pScreen, newX, newY);
@@ -272,7 +272,7 @@ static void xprRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid) {
}
if(window_hash) {
- RootlessWindowRec *winRec = x_hash_table_lookup(window_hash, x_cvt_uint_to_vptr((xp_window_id)wid), NULL);
+ RootlessWindowRec *winRec = x_hash_table_lookup(window_hash, wid, NULL);
if(winRec) {
if(quartzEnableRootless)
@@ -566,8 +566,8 @@ xprHideWindows(Bool hide)
TA_SERVER();
for (screen = 0; screen < screenInfo.numScreens; screen++) {
- pRoot = WindowTable[screenInfo.screens[screen]->myNum];
RootlessFrameID prevWid = NULL;
+ pRoot = WindowTable[screenInfo.screens[screen]->myNum];
for (pWin = pRoot->firstChild; pWin; pWin = pWin->nextSib) {
RootlessWindowRec *winRec = WINREC(pWin);
diff --git a/xorg-server/hw/xquartz/xpr/xprScreen.c b/xorg-server/hw/xquartz/xpr/xprScreen.c
index 3387ecf0a..22a727e67 100644
--- a/xorg-server/hw/xquartz/xpr/xprScreen.c
+++ b/xorg-server/hw/xquartz/xpr/xprScreen.c
@@ -317,11 +317,11 @@ xprAddScreen(int index, ScreenPtr pScreen)
if (noPseudoramiXExtension)
{
- ErrorF("Warning: noPseudoramiXExtension!\n");
-
CGDirectDisplayID dpy;
CGRect frame;
+ ErrorF("Warning: noPseudoramiXExtension!\n");
+
dpy = displayAtIndex(index);
frame = displayScreenBounds(dpy);