1 diff -up tigervnc-1.1.0/unix/xserver/hw/vnc/Input.cc.xorg111 tigervnc-1.1.0/unix/xserver/hw/vnc/Input.cc
2 --- tigervnc-1.1.0/unix/xserver/hw/vnc/Input.cc.xorg111 2011-08-09 23:16:36.000000000 +0200
3 +++ tigervnc-1.1.0/unix/xserver/hw/vnc/Input.cc 2011-11-11 11:59:14.226819903 +0100
4 @@ -82,10 +82,11 @@ static KeyCode KeysymToKeycode(KeySymsPt
5 /* Event queue is shared between all devices. */
7 static xEvent *eventq = NULL;
10 static EventList *eventq = NULL;
14 static void initEventq(void)
16 /* eventq is never free()-ed because it exists during server life. */
17 @@ -100,7 +101,9 @@ static void initEventq(void)
21 +#endif /* XORG < 111 */
24 static void enqueueEvents(DeviceIntPtr dev, int n)
27 @@ -122,6 +125,7 @@ static void enqueueEvents(DeviceIntPtr d
31 +#endif /* XORG < 111 */
33 InputDevice::InputDevice(rfb::VNCServerST *_server)
34 : server(_server), oldButtonMask(0)
35 @@ -141,12 +145,17 @@ InputDevice::InputDevice(rfb::VNCServerS
37 RegisterKeyboardDevice(keyboardDev);
44 void InputDevice::PointerButtonAction(int buttonMask)
54 @@ -160,13 +169,17 @@ void InputDevice::PointerButtonAction(in
56 n = GetPointerEvents(eventq, pointerDev, action, i + 1,
57 POINTER_RELATIVE, 0, 0, NULL);
59 + enqueueEvents(pointerDev, n);
61 valuator_mask_set_range(&mask, 0, 0, NULL);
62 n = GetPointerEvents(eventq, pointerDev, action, i + 1,
63 POINTER_RELATIVE, &mask);
65 enqueueEvents(pointerDev, n);
68 + valuator_mask_set_range(&mask, 0, 0, NULL);
69 + QueuePointerEvents(pointerDev, action, i + 1,
70 + POINTER_RELATIVE, &mask);
75 @@ -175,7 +188,10 @@ void InputDevice::PointerButtonAction(in
77 void InputDevice::PointerMove(const rfb::Point &pos)
79 - int n, valuators[2];
87 @@ -190,12 +206,16 @@ void InputDevice::PointerMove(const rfb:
89 n = GetPointerEvents(eventq, pointerDev, MotionNotify, 0, POINTER_ABSOLUTE, 0,
92 + enqueueEvents(pointerDev, n);
94 valuator_mask_set_range(&mask, 0, 2, valuators);
95 n = GetPointerEvents(eventq, pointerDev, MotionNotify, 0, POINTER_ABSOLUTE,
98 enqueueEvents(pointerDev, n);
100 + valuator_mask_set_range(&mask, 0, 2, valuators);
101 + QueuePointerEvents(pointerDev, MotionNotify, 0, POINTER_ABSOLUTE, &mask);
106 @@ -299,14 +319,20 @@ void InputDevice::initInputDevice(void)
107 static inline void pressKey(DeviceIntPtr dev, int kc, bool down, const char *msg)
115 vlog.debug("%s %d %s", msg, kc, down ? "down" : "up");
117 action = down ? KeyPress : KeyRelease;
118 - n = GetKeyboardEvents(eventq, dev, action, kc);
120 + n = GetKeyboardEvents(eventq, dev, action, kc, NULL);
121 enqueueEvents(dev, n);
123 + QueueKeyboardEvents(dev, action, kc, NULL);
127 #define IS_PRESSED(keyc, keycode) \
128 @@ -341,8 +367,11 @@ public:
129 int state, maxKeysPerMod, keycode;
131 KeyCode *modmap = NULL;
134 + state = XkbStateFieldFromRec(&dev->master->key->xkbInfo->state);
135 +#else /* XORG >= 111 */
136 state = XkbStateFieldFromRec(&dev->u.master->key->xkbInfo->state);
137 +#endif /* XORG >= 111 */
139 KeyClassPtr keyc = dev->key;
141 @@ -380,7 +409,11 @@ public:
143 KeyCode *modmap = NULL;
146 + keyc = dev->master->key;
147 +#else /* XORG >= 111 */
148 keyc = dev->u.master->key;
149 +#endif /* XORG >= 111 */
150 state = XkbStateFieldFromRec(&keyc->xkbInfo->state);
153 @@ -596,7 +629,11 @@ void InputDevice::keyEvent(rdr::U32 keys
158 + keyc = keyboardDev->master->key;
159 +#else /* XORG >= 111 */
160 keyc = keyboardDev->u.master->key;
161 +#endif /* XORG >= 111 */
163 keymap = XkbGetCoreMap(keyboardDev);
165 @@ -753,7 +790,11 @@ ModeSwitchFound:
166 XkbApplyMappingChange(keyboardDev, keymap, minKeyCode,
167 maxKeyCode - minKeyCode + 1,
170 + XkbCopyDeviceKeymap(keyboardDev->master, keyboardDev);
172 XkbCopyDeviceKeymap(keyboardDev->u.master, keyboardDev);
174 #endif /* XORG < 17 */
177 diff -up tigervnc-1.1.0/unix/xserver/hw/vnc/xorg-version.h.xorg111 tigervnc-1.1.0/unix/xserver/hw/vnc/xorg-version.h
178 --- tigervnc-1.1.0/unix/xserver/hw/vnc/xorg-version.h.xorg111 2011-08-09 23:16:36.000000000 +0200
179 +++ tigervnc-1.1.0/unix/xserver/hw/vnc/xorg-version.h 2011-11-11 11:55:32.255835319 +0100
182 #elif XORG_VERSION_CURRENT < ((1 * 10000000) + (10 * 100000) + (99 * 1000))
184 +#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (11 * 100000) + (99 * 1000))
187 #error "X.Org newer than 1.10 is not supported"
189 diff -up tigervnc-1.1.0/unix/xserver/hw/vnc/xvnc.cc.xorg111 tigervnc-1.1.0/unix/xserver/hw/vnc/xvnc.cc
190 --- tigervnc-1.1.0/unix/xserver/hw/vnc/xvnc.cc.xorg111 2011-08-09 23:16:36.000000000 +0200
191 +++ tigervnc-1.1.0/unix/xserver/hw/vnc/xvnc.cc 2011-11-11 11:55:32.256835319 +0100
192 @@ -211,7 +211,11 @@ static void vfbFreeFramebufferMemory(vfb
199 +void ddxGiveUp(enum ExitCode error)
204 @@ -221,9 +225,17 @@ void ddxGiveUp()
211 +AbortDDX(enum ExitCode error)
222 @@ -668,8 +680,13 @@ vfbUninstallColormap(ColormapPtr pmap)
224 if (pmap->mid != pmap->pScreen->defColormap)
227 curpmap = (ColormapPtr) LookupIDByType(pmap->pScreen->defColormap,
230 + dixLookupResourceByType((pointer *) &curpmap, pmap->pScreen->defColormap,
231 + RT_COLORMAP, serverClient, DixUnknownAccess);
233 (*pmap->pScreen->InstallColormap)(curpmap);