Index: unix/xserver/hw/vnc/xvnc.cc =================================================================== --- unix/xserver/hw/vnc/xvnc.cc (revision 3882) +++ unix/xserver/hw/vnc/xvnc.cc (revision 3883) @@ -736,7 +736,7 @@ } static Bool vfbRealizeCursor( -#ifdef XORG_16 +#if XORG >= 16 DeviceIntPtr pDev, #endif ScreenPtr pScreen, CursorPtr pCursor) { @@ -744,7 +744,7 @@ } static Bool vfbUnrealizeCursor( -#ifdef XORG_16 +#if XORG >= 16 DeviceIntPtr pDev, #endif ScreenPtr pScreen, CursorPtr pCursor) { @@ -752,7 +752,7 @@ } static void vfbSetCursor( -#ifdef XORG_16 +#if XORG >= 16 DeviceIntPtr pDev, #endif ScreenPtr pScreen, CursorPtr pCursor, int x, int y) @@ -760,14 +760,14 @@ } static void vfbMoveCursor( -#ifdef XORG_16 +#if XORG >= 16 DeviceIntPtr pDev, #endif ScreenPtr pScreen, int x, int y) { } -#ifdef XORG_16 +#if XORG >= 16 static Bool vfbDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) { @@ -785,7 +785,7 @@ vfbUnrealizeCursor, vfbSetCursor, vfbMoveCursor -#ifdef XORG_16 +#if XORG >= 16 , vfbDeviceCursorInitialize, vfbDeviceCursorCleanup #endif @@ -1303,7 +1303,7 @@ void ProcessInputEvents() { mieqProcessInputEvents(); -#ifdef XORG_15 +#if XORG == 15 miPointerUpdate(); #endif } Index: unix/xserver/hw/vnc/XserverDesktop.cc =================================================================== --- unix/xserver/hw/vnc/XserverDesktop.cc (revision 3882) +++ unix/xserver/hw/vnc/XserverDesktop.cc (revision 3883) @@ -63,7 +63,7 @@ #ifdef XKB #include #endif -#ifdef XORG_16 +#if XORG >= 16 #include "exevents.h" extern void CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master); @@ -77,7 +77,7 @@ static DeviceIntPtr vncKeyboardDevice = NULL; static DeviceIntPtr vncPointerDevice = NULL; -#ifdef XORG_15 +#if XORG == 15 static xEvent *eventq = NULL; #else static EventList *eventq = NULL; @@ -194,7 +194,7 @@ if (httpListener) httpServer = new FileHTTPServer(this); -#ifdef XORG_15 +#if XORG == 15 /* * XXX eventq is never free()-ed because it has to exist during server life * */ @@ -211,7 +211,7 @@ */ if (vncKeyboardDevice == NULL) { vncKeyboardDevice = AddInputDevice( -#ifdef XORG_16 +#if XORG >= 16 serverClient, #endif vfbKeybdProc, TRUE); @@ -220,7 +220,7 @@ if (vncPointerDevice == NULL) { vncPointerDevice = AddInputDevice( -#ifdef XORG_16 +#if XORG >= 16 serverClient, #endif vfbMouseProc, TRUE); @@ -557,7 +557,7 @@ if (!cursorPos.equals(oldCursorPos)) { oldCursorPos = cursorPos; (*pScreen->SetCursorPosition) ( -#ifdef XORG_16 +#if XORG >= 16 vncPointerDevice, #endif pScreen, cursorPos.x, cursorPos.y, FALSE); @@ -569,7 +569,7 @@ void XserverDesktop::blockHandler(fd_set* fds) { try { -#ifdef XORG_15 +#if XORG == 15 ScreenPtr screenWithCursor = GetCurrentRootWindow()->drawable.pScreen; #else ScreenPtr screenWithCursor = @@ -578,7 +578,7 @@ if (screenWithCursor == pScreen) { int x, y; GetSpritePosition( -#ifdef XORG_16 +#if XORG >= 16 vncPointerDevice, #endif &x, &y); @@ -742,7 +742,7 @@ //(*pScreen->SetCursorPosition) (pScreen, pos.x, pos.y, FALSE); NewCurrentScreen( -#ifdef XORG_16 +#if XORG >= 16 vncPointerDevice, #endif pScreen, pos.x, pos.y); @@ -751,7 +751,7 @@ valuators[0] = pos.x; valuators[1] = pos.y; -#ifdef XORG_16 +#if XORG >= 16 GetEventList(&eventq); #endif n = GetPointerEvents (eventq, vncPointerDevice, MotionNotify, 0, @@ -759,7 +759,7 @@ for (i = 0; i < n; i++) { mieqEnqueue (vncPointerDevice, -#ifdef XORG_15 +#if XORG == 15 eventq + i #else (eventq + i)->event @@ -779,7 +779,7 @@ for (j = 0; j < n; j++) { mieqEnqueue (vncPointerDevice, -#ifdef XORG_15 +#if XORG == 15 eventq + j #else (eventq + j)->event @@ -809,7 +809,7 @@ RRModePtr mode; // Make sure all RandR tables are properly populated -#ifdef XORG_15 +#if XORG == 15 ret = RRGetInfo(pScreen); #else ret = RRGetInfo(pScreen, FALSE); @@ -832,7 +832,7 @@ // Then we have to call RRGetInfo again for it to copy the RandR // 1.0 information to the 1.2 structures. -#ifdef XORG_15 +#if XORG == 15 ret = RRGetInfo(pScreen); #else ret = RRGetInfo(pScreen, FALSE); @@ -1008,7 +1008,7 @@ down ? KeyPress : KeyRelease, keycode); for (i = 0; i < n; i++) { mieqEnqueue (vncKeyboardDevice, -#ifdef XORG_15 +#if XORG == 15 eventq + i #else (eventq + i)->event @@ -1161,7 +1161,7 @@ vlog.info("Added unknown keysym 0x%x to keycode %d",keysym,kc); -#ifdef XORG_15 +#if XORG == 15 master = inputInfo.keyboard; #else master = vncKeyboardDevice->u.master; @@ -1169,7 +1169,7 @@ if (vncKeyboardDevice == dixLookupPrivate(&master->devPrivates, CoreDevicePrivateKey)) { dixSetPrivate(&master->devPrivates, CoreDevicePrivateKey, NULL); -#ifdef XORG_15 +#if XORG == 15 SwitchCoreKeyboard(vncKeyboardDevice); #else CopyKeyClass(vncKeyboardDevice, master); @@ -1213,7 +1213,7 @@ KeyPress : KeyRelease, kc); for (i = 0; i < n; i++) { mieqEnqueue (vncKeyboardDevice, -#ifdef XORG_15 +#if XORG == 15 eventq + i #else (eventq + i)->event @@ -1492,7 +1492,7 @@ map[4] = 4; map[5] = 5; InitPointerDeviceStruct(pDev, map, 5, -#ifdef XORG_15 +#if XORG == 15 GetMotionHistory, #endif (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), 2); Index: unix/xserver/hw/vnc/XserverDesktop.h =================================================================== --- unix/xserver/hw/vnc/XserverDesktop.h (revision 3882) +++ unix/xserver/hw/vnc/XserverDesktop.h (revision 3883) @@ -29,10 +29,10 @@ #if XORG_VERSION_CURRENT < \ ((1 * 10000000) + (5 * 100000) + (99 * 1000)) /* Xorg 1.5 branch */ -#define XORG_15 +#define XORG 15 #else /* Xorg 1.6 branch */ -#define XORG_16 +#define XORG 16 #endif #include Index: unix/xserver/hw/vnc/vncHooks.cc =================================================================== --- unix/xserver/hw/vnc/vncHooks.cc (revision 3882) +++ unix/xserver/hw/vnc/vncHooks.cc (revision 3883) @@ -89,7 +89,7 @@ GCOps *wrappedOps; } vncHooksGCRec, *vncHooksGCPtr; -#ifdef XORG_15 +#if XORG == 15 static DevPrivateKey vncHooksScreenPrivateKey = &vncHooksScreenPrivateKey; static DevPrivateKey vncHooksGCPrivateKey = &vncHooksGCPrivateKey; #else @@ -119,7 +119,7 @@ static void vncHooksStoreColors(ColormapPtr pColormap, int ndef, xColorItem* pdef); static Bool vncHooksDisplayCursor( -#ifdef XORG_16 +#if XORG >= 16 DeviceIntPtr pDev, #endif ScreenPtr pScreen, CursorPtr cursor); @@ -454,7 +454,7 @@ // DisplayCursor - get the cursor shape static Bool vncHooksDisplayCursor( -#ifdef XORG_16 +#if XORG >= 16 DeviceIntPtr pDev, #endif ScreenPtr pScreen_, CursorPtr cursor) @@ -462,11 +462,11 @@ SCREEN_UNWRAP(pScreen_, DisplayCursor); Bool ret = (*pScreen->DisplayCursor) ( -#ifdef XORG_16 +#if XORG >= 16 pDev, #endif pScreen, cursor); -#ifdef XORG_16 +#if XORG >= 16 /* * XXX DIX calls this function with NULL argument to remove cursor sprite from * screen. Should we handle this in setCursor as well? @@ -474,7 +474,7 @@ if (cursor != NullCursor) { #endif vncHooksScreen->desktop->setCursor(cursor); -#ifdef XORG_16 +#if XORG >= 16 } #endif