Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2005:
[Freeciv-Dev] (PR#13542) alt-left-click same as middle-click
Home

[Freeciv-Dev] (PR#13542) alt-left-click same as middle-click

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13542) alt-left-click same as middle-click
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 25 Jul 2005 14:35:10 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13542 >

This patch changes alt-left-click to be the same as a middle-click.
This hopefully allows windows or mac mice without middle buttons to have
a middle-click behavior (which pops up the tile info).

Note that in X alt-left-click is usually taken by the window manager.  I
tested this however by killing the window manager and clicking real fast
before it was automatically restarted.  Presumably windows and mac
wouldn't have the window manager problem.  However there are other
choices like ctrl-shift or MOD2 (whatever that is).

Note that 1-button mice will still have a major problem.  And there's no
way to do the wake-up-sentries action (normally ctrl-MMB).

For 2.1 we should really find a way for all these mapview actions to be
configurable.  This patch is made for the dev branch but intended mostly
for 2.0.

-jason

Index: client/gui-gtk-2.0/mapctrl.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/mapctrl.c,v
retrieving revision 1.52
diff -p -u -r1.52 mapctrl.c
--- client/gui-gtk-2.0/mapctrl.c        28 Jun 2005 18:12:30 -0000      1.52
+++ client/gui-gtk-2.0/mapctrl.c        25 Jul 2005 21:31:33 -0000
@@ -257,6 +257,10 @@ gboolean butt_down_mapcanvas(GtkWidget *
     else if (ptile && (ev->state & GDK_SHIFT_MASK)) {
       clipboard_copy_production(ptile);
     }
+    /* <ALT> + LMB: popit (same as middle-click) */
+    else if (ptile && (ev->state & GDK_MOD1_MASK)) {
+      popit(ev, ptile);
+    }
     /* LMB in Area Selection mode. */
     else if(tiles_hilited_cities) {
       if (ptile) {

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#13542) alt-left-click same as middle-click, Jason Short <=