diff options
author | Adam Tkac <atkac@redhat.com> | 2009-08-28 12:00:32 +0000 |
---|---|---|
committer | Adam Tkac <atkac@redhat.com> | 2009-08-28 12:00:32 +0000 |
commit | f009446c65002758860c366b83c2339c35ee579e (patch) | |
tree | ead7f5a88873fa5d6032861a014cee371f1b6dbc /unix/xserver | |
parent | f55ca173278c2ac09283b548a897cf82885bc6a9 (diff) | |
download | tigervnc-f009446c65002758860c366b83c2339c35ee579e.tar.gz tigervnc-f009446c65002758860c366b83c2339c35ee579e.zip |
Use "XORG <version>" macro instead of "XORG_<version>" to distinguish between X.Org branches.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3883 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix/xserver')
-rw-r--r-- | unix/xserver/hw/vnc/XserverDesktop.cc | 38 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/XserverDesktop.h | 4 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/vncHooks.cc | 12 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/xvnc.cc | 14 |
4 files changed, 34 insertions, 34 deletions
diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc index 9a5fb408..a36e7696 100644 --- a/unix/xserver/hw/vnc/XserverDesktop.cc +++ b/unix/xserver/hw/vnc/XserverDesktop.cc @@ -63,7 +63,7 @@ extern char *display; #ifdef XKB #include <xkbsrv.h> #endif -#ifdef XORG_16 +#if XORG >= 16 #include "exevents.h" extern void CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master); @@ -77,7 +77,7 @@ CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master); 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 @@ XserverDesktop::XserverDesktop(ScreenPtr pScreen_, 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 @@ XserverDesktop::XserverDesktop(ScreenPtr pScreen_, */ if (vncKeyboardDevice == NULL) { vncKeyboardDevice = AddInputDevice( -#ifdef XORG_16 +#if XORG >= 16 serverClient, #endif vfbKeybdProc, TRUE); @@ -220,7 +220,7 @@ XserverDesktop::XserverDesktop(ScreenPtr pScreen_, if (vncPointerDevice == NULL) { vncPointerDevice = AddInputDevice( -#ifdef XORG_16 +#if XORG >= 16 serverClient, #endif vfbMouseProc, TRUE); @@ -557,7 +557,7 @@ void XserverDesktop::positionCursor() 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::positionCursor() 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 @@ void XserverDesktop::blockHandler(fd_set* fds) if (screenWithCursor == pScreen) { int x, y; GetSpritePosition( -#ifdef XORG_16 +#if XORG >= 16 vncPointerDevice, #endif &x, &y); @@ -742,7 +742,7 @@ void XserverDesktop::pointerEvent(const Point& pos, int buttonMask) //(*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 @@ void XserverDesktop::pointerEvent(const Point& pos, int buttonMask) 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 @@ void XserverDesktop::pointerEvent(const Point& pos, int buttonMask) for (i = 0; i < n; i++) { mieqEnqueue (vncPointerDevice, -#ifdef XORG_15 +#if XORG == 15 eventq + i #else (eventq + i)->event @@ -779,7 +779,7 @@ void XserverDesktop::pointerEvent(const Point& pos, int buttonMask) for (j = 0; j < n; j++) { mieqEnqueue (vncPointerDevice, -#ifdef XORG_15 +#if XORG == 15 eventq + j #else (eventq + j)->event @@ -809,7 +809,7 @@ unsigned int XserverDesktop::setScreenLayout(int fb_width, int fb_height, 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 @@ unsigned int XserverDesktop::setScreenLayout(int fb_width, int fb_height, // 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 @@ private: 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 @@ void XserverDesktop::keyEvent(rdr::U32 keysym, bool down) 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 @@ void XserverDesktop::keyEvent(rdr::U32 keysym, bool down) 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 @@ void XserverDesktop::keyEvent(rdr::U32 keysym, bool down) 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 @@ static int vfbMouseProc(DeviceIntPtr pDevice, int onoff) map[4] = 4; map[5] = 5; InitPointerDeviceStruct(pDev, map, 5, -#ifdef XORG_15 +#if XORG == 15 GetMotionHistory, #endif (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), 2); diff --git a/unix/xserver/hw/vnc/XserverDesktop.h b/unix/xserver/hw/vnc/XserverDesktop.h index 6777f092..b394d16f 100644 --- a/unix/xserver/hw/vnc/XserverDesktop.h +++ b/unix/xserver/hw/vnc/XserverDesktop.h @@ -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 <rfb/SDesktop.h> diff --git a/unix/xserver/hw/vnc/vncHooks.cc b/unix/xserver/hw/vnc/vncHooks.cc index 010e9550..700efbbf 100644 --- a/unix/xserver/hw/vnc/vncHooks.cc +++ b/unix/xserver/hw/vnc/vncHooks.cc @@ -89,7 +89,7 @@ typedef struct { 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 vncHooksInstallColormap(ColormapPtr pColormap); 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 @@ static void vncHooksStoreColors(ColormapPtr pColormap, int ndef, // 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 @@ static Bool vncHooksDisplayCursor( 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 @@ static Bool vncHooksDisplayCursor( if (cursor != NullCursor) { #endif vncHooksScreen->desktop->setCursor(cursor); -#ifdef XORG_16 +#if XORG >= 16 } #endif diff --git a/unix/xserver/hw/vnc/xvnc.cc b/unix/xserver/hw/vnc/xvnc.cc index 9fdcaf3b..45820ee3 100644 --- a/unix/xserver/hw/vnc/xvnc.cc +++ b/unix/xserver/hw/vnc/xvnc.cc @@ -736,7 +736,7 @@ vfbCrossScreen (ScreenPtr pScreen, Bool entering) } static Bool vfbRealizeCursor( -#ifdef XORG_16 +#if XORG >= 16 DeviceIntPtr pDev, #endif ScreenPtr pScreen, CursorPtr pCursor) { @@ -744,7 +744,7 @@ static Bool vfbRealizeCursor( } static Bool vfbUnrealizeCursor( -#ifdef XORG_16 +#if XORG >= 16 DeviceIntPtr pDev, #endif ScreenPtr pScreen, CursorPtr pCursor) { @@ -752,7 +752,7 @@ static Bool vfbUnrealizeCursor( } 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 vfbSetCursor( } 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 @@ static miPointerSpriteFuncRec vfbPointerSpriteFuncs = { vfbUnrealizeCursor, vfbSetCursor, vfbMoveCursor -#ifdef XORG_16 +#if XORG >= 16 , vfbDeviceCursorInitialize, vfbDeviceCursorCleanup #endif @@ -1303,7 +1303,7 @@ Bool LegalModifier(unsigned int key, DeviceIntPtr pDev) void ProcessInputEvents() { mieqProcessInputEvents(); -#ifdef XORG_15 +#if XORG == 15 miPointerUpdate(); #endif } |