1265N/ADownloaded from:
1265N/Ahttp://pkgs.fedoraproject.org/gitweb/?p=tigervnc.git;a=blob_plain;f=tigervnc11-xorg111.patch;hb=HEAD
1265N/A
1265N/Acommit eba8cb45c6383117ffc99ef89b0691a33daeaa7c - Fri, 11 Nov 2011 13:47:47
1265N/A
1265N/Adiff -up tigervnc-1.1.0/unix/xserver/hw/vnc/Input.cc.xorg111 tigervnc-1.1.0/unix/xserver/hw/vnc/Input.cc
1265N/A--- tigervnc-1.1.0/unix/xserver/hw/vnc/Input.cc.xorg111 2011-08-09 23:16:36.000000000 +0200
1265N/A+++ tigervnc-1.1.0/unix/xserver/hw/vnc/Input.cc 2011-11-11 11:59:14.226819903 +0100
1265N/A@@ -82,10 +82,11 @@ static KeyCode KeysymToKeycode(KeySymsPt
1265N/A /* Event queue is shared between all devices. */
1265N/A #if XORG == 15
1265N/A static xEvent *eventq = NULL;
1265N/A-#else
1265N/A+#elif XORG < 111
1265N/A static EventList *eventq = NULL;
1265N/A #endif
1265N/A
1265N/A+#if XORG < 111
1265N/A static void initEventq(void)
1265N/A {
1265N/A /* eventq is never free()-ed because it exists during server life. */
1265N/A@@ -100,7 +101,9 @@ static void initEventq(void)
1265N/A #endif
1265N/A }
1265N/A }
1265N/A+#endif /* XORG < 111 */
1265N/A
1265N/A+#if XORG < 111
1265N/A static void enqueueEvents(DeviceIntPtr dev, int n)
1265N/A {
1265N/A int i;
1265N/A@@ -122,6 +125,7 @@ static void enqueueEvents(DeviceIntPtr d
1265N/A );
1265N/A }
1265N/A }
1265N/A+#endif /* XORG < 111 */
1265N/A
1265N/A InputDevice::InputDevice(rfb::VNCServerST *_server)
1265N/A : server(_server), oldButtonMask(0)
1265N/A@@ -141,12 +145,17 @@ InputDevice::InputDevice(rfb::VNCServerS
1265N/A keyboardProc, TRUE);
1265N/A RegisterKeyboardDevice(keyboardDev);
1265N/A #endif
1265N/A+#if XORG < 111
1265N/A initEventq();
1265N/A+#endif
1265N/A }
1265N/A
1265N/A void InputDevice::PointerButtonAction(int buttonMask)
1265N/A {
1265N/A- int i, n;
1265N/A+ int i;
1265N/A+#if XORG < 111
1265N/A+ int n;
1265N/A+#endif
1265N/A #if XORG >= 110
1265N/A ValuatorMask mask;
1265N/A #endif
1265N/A@@ -160,13 +169,17 @@ void InputDevice::PointerButtonAction(in
1265N/A #if XORG < 110
1265N/A n = GetPointerEvents(eventq, pointerDev, action, i + 1,
1265N/A POINTER_RELATIVE, 0, 0, NULL);
1265N/A-#else
1265N/A+ enqueueEvents(pointerDev, n);
1265N/A+#elif XORG < 111
1265N/A valuator_mask_set_range(&mask, 0, 0, NULL);
1265N/A n = GetPointerEvents(eventq, pointerDev, action, i + 1,
1265N/A POINTER_RELATIVE, &mask);
1265N/A-#endif
1265N/A enqueueEvents(pointerDev, n);
1265N/A-
1265N/A+#else
1265N/A+ valuator_mask_set_range(&mask, 0, 0, NULL);
1265N/A+ QueuePointerEvents(pointerDev, action, i + 1,
1265N/A+ POINTER_RELATIVE, &mask);
1265N/A+#endif
1265N/A }
1265N/A }
1265N/A
1265N/A@@ -175,7 +188,10 @@ void InputDevice::PointerButtonAction(in
1265N/A
1265N/A void InputDevice::PointerMove(const rfb::Point &pos)
1265N/A {
1265N/A- int n, valuators[2];
1265N/A+ int valuators[2];
1265N/A+#if XORG < 111
1265N/A+ int n;
1265N/A+#endif
1265N/A #if XORG >= 110
1265N/A ValuatorMask mask;
1265N/A #endif
1265N/A@@ -190,12 +206,16 @@ void InputDevice::PointerMove(const rfb:
1265N/A #if XORG < 110
1265N/A n = GetPointerEvents(eventq, pointerDev, MotionNotify, 0, POINTER_ABSOLUTE, 0,
1265N/A 2, valuators);
1265N/A-#else
1265N/A+ enqueueEvents(pointerDev, n);
1265N/A+#elif XORG < 111
1265N/A valuator_mask_set_range(&mask, 0, 2, valuators);
1265N/A n = GetPointerEvents(eventq, pointerDev, MotionNotify, 0, POINTER_ABSOLUTE,
1265N/A &mask);
1265N/A-#endif
1265N/A enqueueEvents(pointerDev, n);
1265N/A+#else
1265N/A+ valuator_mask_set_range(&mask, 0, 2, valuators);
1265N/A+ QueuePointerEvents(pointerDev, MotionNotify, 0, POINTER_ABSOLUTE, &mask);
1265N/A+#endif
1265N/A
1265N/A cursorPos = pos;
1265N/A }
1265N/A@@ -299,14 +319,20 @@ void InputDevice::initInputDevice(void)
1265N/A static inline void pressKey(DeviceIntPtr dev, int kc, bool down, const char *msg)
1265N/A {
1265N/A int action;
1265N/A+#if XORG < 111
1265N/A unsigned int n;
1265N/A+#endif
1265N/A
1265N/A if (msg != NULL)
1265N/A vlog.debug("%s %d %s", msg, kc, down ? "down" : "up");
1265N/A
1265N/A action = down ? KeyPress : KeyRelease;
1265N/A- n = GetKeyboardEvents(eventq, dev, action, kc);
1265N/A+#if XORG < 111
1265N/A+ n = GetKeyboardEvents(eventq, dev, action, kc, NULL);
1265N/A enqueueEvents(dev, n);
1265N/A+#else
1265N/A+ QueueKeyboardEvents(dev, action, kc, NULL);
1265N/A+#endif
1265N/A }
1265N/A
1265N/A #define IS_PRESSED(keyc, keycode) \
1265N/A@@ -341,8 +367,11 @@ public:
1265N/A int state, maxKeysPerMod, keycode;
1265N/A #if XORG >= 17
1265N/A KeyCode *modmap = NULL;
1265N/A-
1265N/A+#if XORG >= 111
1265N/A+ state = XkbStateFieldFromRec(&dev->master->key->xkbInfo->state);
1265N/A+#else /* XORG >= 111 */
1265N/A state = XkbStateFieldFromRec(&dev->u.master->key->xkbInfo->state);
1265N/A+#endif /* XORG >= 111 */
1265N/A #else
1265N/A KeyClassPtr keyc = dev->key;
1265N/A state = keyc->state;
1265N/A@@ -380,7 +409,11 @@ public:
1265N/A #if XORG >= 17
1265N/A KeyCode *modmap = NULL;
1265N/A
1265N/A+#if XORG >= 111
1265N/A+ keyc = dev->master->key;
1265N/A+#else /* XORG >= 111 */
1265N/A keyc = dev->u.master->key;
1265N/A+#endif /* XORG >= 111 */
1265N/A state = XkbStateFieldFromRec(&keyc->xkbInfo->state);
1265N/A #else
1265N/A keyc = dev->key;
1265N/A@@ -596,7 +629,11 @@ void InputDevice::keyEvent(rdr::U32 keys
1265N/A }
1265N/A
1265N/A #if XORG >= 17
1265N/A+#if XORG >= 111
1265N/A+ keyc = keyboardDev->master->key;
1265N/A+#else /* XORG >= 111 */
1265N/A keyc = keyboardDev->u.master->key;
1265N/A+#endif /* XORG >= 111 */
1265N/A
1265N/A keymap = XkbGetCoreMap(keyboardDev);
1265N/A if (!keymap) {
1265N/A@@ -753,7 +790,11 @@ ModeSwitchFound:
1265N/A XkbApplyMappingChange(keyboardDev, keymap, minKeyCode,
1265N/A maxKeyCode - minKeyCode + 1,
1265N/A NULL, serverClient);
1265N/A+#if XORG >= 111
1265N/A+ XkbCopyDeviceKeymap(keyboardDev->master, keyboardDev);
1265N/A+#else
1265N/A XkbCopyDeviceKeymap(keyboardDev->u.master, keyboardDev);
1265N/A+#endif
1265N/A #endif /* XORG < 17 */
1265N/A break;
1265N/A }
1265N/Adiff -up tigervnc-1.1.0/unix/xserver/hw/vnc/xorg-version.h.xorg111 tigervnc-1.1.0/unix/xserver/hw/vnc/xorg-version.h
1265N/A--- tigervnc-1.1.0/unix/xserver/hw/vnc/xorg-version.h.xorg111 2011-08-09 23:16:36.000000000 +0200
1265N/A+++ tigervnc-1.1.0/unix/xserver/hw/vnc/xorg-version.h 2011-11-11 11:55:32.255835319 +0100
1276N/A@@ -36,6 +36,8 @@
1265N/A #define XORG 19
1265N/A #elif XORG_VERSION_CURRENT < ((1 * 10000000) + (10 * 100000) + (99 * 1000))
1265N/A #define XORG 110
1265N/A+#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (11 * 100000) + (99 * 1000))
1265N/A+#define XORG 111
1265N/A #else
1265N/A #error "X.Org newer than 1.10 is not supported"
1265N/A #endif
1265N/Adiff -up tigervnc-1.1.0/unix/xserver/hw/vnc/xvnc.cc.xorg111 tigervnc-1.1.0/unix/xserver/hw/vnc/xvnc.cc
1265N/A--- tigervnc-1.1.0/unix/xserver/hw/vnc/xvnc.cc.xorg111 2011-08-09 23:16:36.000000000 +0200
1265N/A+++ tigervnc-1.1.0/unix/xserver/hw/vnc/xvnc.cc 2011-11-11 11:55:32.256835319 +0100
1265N/A@@ -211,7 +211,11 @@ static void vfbFreeFramebufferMemory(vfb
1265N/A
1265N/A extern "C" {
1265N/A
1265N/A+#if XORG < 111
1265N/A void ddxGiveUp()
1265N/A+#else
1265N/A+void ddxGiveUp(enum ExitCode error)
1265N/A+#endif
1265N/A {
1265N/A int i;
1265N/A
1265N/A@@ -221,9 +225,17 @@ void ddxGiveUp()
1265N/A }
1265N/A
1265N/A void
1265N/A+#if XORG < 111
1265N/A AbortDDX()
1265N/A+#else
1265N/A+AbortDDX(enum ExitCode error)
1265N/A+#endif
1265N/A {
1265N/A+#if XORG < 111
1265N/A ddxGiveUp();
1265N/A+#else
1265N/A+ ddxGiveUp(error);
1265N/A+#endif
1265N/A }
1265N/A
1265N/A #ifdef __DARWIN__
1265N/A@@ -668,8 +680,13 @@ vfbUninstallColormap(ColormapPtr pmap)
1265N/A {
1265N/A if (pmap->mid != pmap->pScreen->defColormap)
1265N/A {
1265N/A+#if XORG < 111
1265N/A curpmap = (ColormapPtr) LookupIDByType(pmap->pScreen->defColormap,
1265N/A RT_COLORMAP);
1265N/A+#else
1265N/A+ dixLookupResourceByType((pointer *) &curpmap, pmap->pScreen->defColormap,
1265N/A+ RT_COLORMAP, serverClient, DixUnknownAccess);
1265N/A+#endif
1265N/A (*pmap->pScreen->InstallColormap)(curpmap);
1265N/A }
1265N/A }