Complete.Org: Mailing Lists: Archives: freeciv-dev: December 1998:
[Freeciv-Dev] 2 Button Mouse
Home

[Freeciv-Dev] 2 Button Mouse

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxxx
Subject: [Freeciv-Dev] 2 Button Mouse
From: Bussi Andrea <bta@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 11 Dec 1998 11:19:07 +0100

This patch should help those who don't have a 3 button mouse,
and who are not able to get 3 button emulation to work. (read: me!)
Instead of pressing middle button, you just can press Button 2 +
Control,
(and probably other special keys too) to get tile information.
I don't know much about X events, but this seems to work fine for me, so
I think it could be correct. If someone could kindly looks if this patch
is 
rigth, I'll be pleased to have his blessing. And if it's dead wrong, I'd
like to
heard that also. Thanx. (And excuse my English :-)
                                                bta@xxxxxxxxxxxxxxxx

--- ../../freeciv-1.7.1/client/mapctrl.c        Thu Nov  5 21:36:33 1998
+++ ./mapctrl.c Thu Dec 10 22:36:33 1998
@@ -794,10 +784,10 @@
        popup_unit_select_dialog(ptile);
     }
   }
-  else if(ev->button==Button2)
-    popit(ev->x, ev->y, xtile, ytile);
-  else
+  else if(ev->button==Button3&&ev->state==0)
     center_tile_mapcanvas(xtile, ytile);
+  else
+    popit(ev->x, ev->y, xtile, ytile);
 }
 

/**************************************************************************


[Prev in Thread] Current Thread [Next in Thread]