bo-yang / plan9front

Automatically exported from code.google.com/p/plan9front
0 stars 0 forks source link

drawterm emulation of 2-mouse button does not work in ubuntu #116

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In drawterm (using ubuntu), shift + 3'rd (last) mouse button does not have any 
effect. According to docs, it should simulate the 2ed button.

Original issue reported on code.google.com by 9...@vrtra.net on 5 May 2012 at 7:39

GoogleCodeExporter commented 9 years ago
A patch for the same is below
diff -r 9c9f289188ff gui-x11/x11.c
--- a/gui-x11/x11.c     Sun Jan 02 18:33:44 2011 -0500
+++ b/gui-x11/x11.c     Sat May 05 01:00:27 2012 -0700
@@ -1340,8 +1340,12 @@
                ms.buttons |= 1;
        if(s & Button2Mask)
                ms.buttons |= 2;
-       if(s & Button3Mask)
-               ms.buttons |= 4;
+       if(s & Button3Mask){
+              if (s & ShiftMask)
+                    ms.buttons |= 2;
+              else
+                    ms.buttons |= 4;
+       }
        if(s & Button4Mask)
                ms.buttons |= 8;
        if(s & Button5Mask)

Original comment by 9...@vrtra.net on 5 May 2012 at 8:02

GoogleCodeExporter commented 9 years ago
the version of drawterm in /sys/src/cmd/unix is
pretty old. have you tried it with the one from
rsc's swtch.com?

Original comment by cinap_le...@felloff.net on 8 May 2012 at 11:00

GoogleCodeExporter commented 9 years ago
It does, I will log a bug on that site instead.

Original comment by 9...@vrtra.net on 9 May 2012 at 12:10

GoogleCodeExporter commented 9 years ago

Original comment by cinap_le...@felloff.net on 16 May 2012 at 3:15