changeset 22713:8d74a9e409f1

Patch from Dylan Simon <dylan@dylex.net> to fix handling escape key presses. This should fix a bug where pressing esc+w would popup the window list, and then close immediately. Closes #5615.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 24 Apr 2008 01:43:25 +0000
parents 32624648b797
children e587650c5d16
files COPYRIGHT finch/libgnt/gntmain.c
diffstat 2 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Wed Apr 23 10:25:53 2008 +0000
+++ b/COPYRIGHT	Thu Apr 24 01:43:25 2008 +0000
@@ -360,6 +360,7 @@
 Dossy Shiobara
 Michael Shkutkov
 Shreevatsa R
+Dylan Simon <dylan@dylex.net>
 Ettore Simone
 John Silvestri
 Craig Slusher
--- a/finch/libgnt/gntmain.c	Wed Apr 23 10:25:53 2008 +0000
+++ b/finch/libgnt/gntmain.c	Thu Apr 24 01:43:25 2008 +0000
@@ -245,8 +245,11 @@
 	}
 
 	rd += HOLDING_ESCAPE;
-	if (HOLDING_ESCAPE)
+	if (HOLDING_ESCAPE) {
 		keys[0] = '\033';
+		g_source_remove(escape_stuff.timer);
+		escape_stuff.timer = 0;
+	}
 	keys[rd] = 0;
 	gnt_wm_set_event_stack(wm, TRUE);
 
@@ -271,12 +274,6 @@
 		int p;
 
 		if (k[0] == '\033' && rd == 1) {
-			if (escape_stuff.timer) {
-				gnt_wm_process_input(wm, "\033\033");
-				g_source_remove(escape_stuff.timer);
-				escape_stuff.timer = 0;
-				break;
-			}
 			escape_stuff.timer = g_timeout_add(250, escape_timeout, NULL);
 			break;
 		}