Complete.Org: Mailing Lists: Archives: freeciv-dev: May 1999:
[Freeciv-Dev] Patch: numlock no longer needed in GTK+ client
Home

[Freeciv-Dev] Patch: numlock no longer needed in GTK+ client

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Patch: numlock no longer needed in GTK+ client
From: Patrick Smith <patsmith@xxxxxxxxx>
Date: Fri, 07 May 1999 01:39:32 +0000

Here is a patch so the GTK+ client treats the numeric keypad more
sensibly, even with numlock off.  Without this patch, and running
with numlock off, using the keypad to move units causes the input
focus to wander around, and eventually the keypad no longer moves
the units.

This patch doesn't prevent one from typing in the input line at the
bottom of the window; clicking in that line with the mouse moves
the focus there.

But you can't move the focus back to the main map just by clicking
on the map.  :-(  One way that works is to click on the message
output pane and then on the main map.  (This is with or without
the present patch.)
-- 
patsmith@xxxxxxxxx
? d
? cvs
Index: client/gui-gtk/gui_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/gui_main.c,v
retrieving revision 1.6
diff -u -r1.6 gui_main.c
--- gui_main.c  1999/05/03 15:19:34     1.6
+++ gui_main.c  1999/05/07 01:33:01
@@ -363,6 +363,8 @@
     case GDK_t:                        key_city_workers(widget,event); break;
     default:                                                   return FALSE;
     }
+
+    gtk_signal_emit_stop_by_name(GTK_OBJECT(widget), "key_press_event");
     return TRUE;
 }
 

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