Do not translate mouse buttons according to the server map; treat VNC mouse buttons as logical buttons. This solves the problem with LeftHanded+LeftHanded=RightHanded, and is also much more in line with the keyboard handling: After all, keysyms are logical.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@239 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/xc/programs/Xserver/vnc/XserverDesktop.cc b/xc/programs/Xserver/vnc/XserverDesktop.cc
index 9b5294e..f53caec 100644
--- a/xc/programs/Xserver/vnc/XserverDesktop.cc
+++ b/xc/programs/Xserver/vnc/XserverDesktop.cc
@@ -614,14 +614,9 @@
 
   for (int i = 0; i < 5; i++) {
     if ((buttonMask ^ oldButtonMask) & (1<<i)) {
-#ifdef XINPUT
-      // God knows why but some idiot decided to conditionally move the pointer
-      // mapping out of DIX, so we guess here that if XINPUT is defined we have
-      // to do it ourselves...
-      ev.u.u.detail = ((DeviceIntPtr)dev)->button->map[i + 1];
-#else
+      // Do not use the pointer mapping. Treat VNC buttons as logical
+      // buttons.
       ev.u.u.detail = i + 1;
-#endif
       ev.u.u.type = (buttonMask & (1<<i)) ? ButtonPress : ButtonRelease;
       (*dev->processInputProc)(&ev, (DeviceIntPtr)dev, 1);
     }