[Freeciv-Dev] Re: Wheel mouse problem with gtk1 client (PR#2139)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Mateusz Stefek wrote:
When I use wheel, the client sees it as right mouse button
attached patch fixes it
Great patch. This behavior has always bugged me.
The attached patch fixes this for gtk2 and xaw as well. IMO it should
go in before the branch (or be applied to the stable branch directly),
as this is a significant UI issue.
After the branch, I'd like to discuss this function in more detail.
What is <ctrl> supposed to do in this context? What useful things can
we do with button4 and button5? I suggest button4 and button5 scroll
vertically, and <ctrl>-button4 and <ctrl>-button5 scroll horizontally.
jason
Index: client//gui-gtk/mapctrl.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/mapctrl.c,v
retrieving revision 1.67
diff -u -r1.67 mapctrl.c
--- client//gui-gtk/mapctrl.c 2002/09/11 17:04:40 1.67
+++ client//gui-gtk/mapctrl.c 2002/10/07 11:23:09
@@ -311,7 +311,7 @@
gtk_widget_grab_focus(turn_done_button);
} else if ((ev->button == 2) || (ev->state & GDK_CONTROL_MASK)) {
popit(ev, xtile, ytile);
- } else {
+ } else if (ev->button == 3) {
center_tile_mapcanvas(xtile, ytile);
}
return TRUE;
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.7
diff -u -r1.7 mapctrl.c
--- client//gui-gtk-2.0/mapctrl.c 2002/09/11 17:04:40 1.7
+++ client//gui-gtk-2.0/mapctrl.c 2002/10/07 11:23:09
@@ -303,7 +303,7 @@
gtk_widget_grab_focus(turn_done_button);
} else if ((ev->button == 2) || (ev->state & GDK_CONTROL_MASK)) {
popit(ev, xtile, ytile);
- } else {
+ } else if (ev->button == 3) {
center_tile_mapcanvas(xtile, ytile);
}
return TRUE;
Index: client//gui-xaw/mapctrl.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/mapctrl.c,v
retrieving revision 1.56
diff -u -r1.56 mapctrl.c
--- client//gui-xaw/mapctrl.c 2002/09/11 17:04:41 1.56
+++ client//gui-xaw/mapctrl.c 2002/10/07 11:23:09
@@ -269,8 +269,9 @@
do_map_click(x, y);
else if (ev->button==Button2||ev->state&ControlMask)
popit(ev->x, ev->y, x, y);
- else
+ else if (ev->button == Button3) {
center_tile_mapcanvas(x, y);
+ }
}
/**************************************************************************
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Re: Wheel mouse problem with gtk1 client (PR#2139),
Jason Short <=
|
|