changeset 16282:4a1fc97196c0

merge of '5abe746924f21bc66bd85e71590c1f148ede2930' and '86dece2fcce47e701e9ffbda491eed1f87a77d78'
author Stu Tomlinson <stu@nosnilmot.com>
date Fri, 20 Apr 2007 11:53:43 +0000
parents 234b645ada99 (current diff) 82b6fdd899a9 (diff)
children 5187395d6b78 9da82444eee3
files
diffstat 3 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntmain.c	Fri Apr 20 07:05:49 2007 +0000
+++ b/finch/libgnt/gntmain.c	Fri Apr 20 11:53:43 2007 +0000
@@ -211,10 +211,11 @@
 		raise(SIGABRT);
 	}
 
+	gnt_wm_set_event_stack(wm, TRUE);
 	rd += HOLDING_ESCAPE;
 	keys[rd] = 0;
 	if (mouse_enabled && detect_mouse_action(keys))
-		return TRUE;
+		goto end;
 
 	if (HOLDING_ESCAPE)
 		keys[0] = '\033';
@@ -243,7 +244,8 @@
 		rd -= p;
 		k += p;
 	}
-
+end:
+	gnt_wm_set_event_stack(wm, FALSE);
 	return TRUE;
 }
 
--- a/finch/libgnt/gntwm.c	Fri Apr 20 07:05:49 2007 +0000
+++ b/finch/libgnt/gntwm.c	Fri Apr 20 11:53:43 2007 +0000
@@ -1263,10 +1263,7 @@
 
 	idle_update = TRUE;
 
-	wm->event_stack = TRUE;
-
 	if (gnt_bindable_perform_action_key(GNT_BINDABLE(wm), keys)) {
-		wm->event_stack = FALSE;
 		return TRUE;
 	}
 
@@ -1299,7 +1296,6 @@
 			if (ox != x || oy != y) {
 				gnt_screen_move_widget(widget, x, y);
 				window_reverse(widget, TRUE, wm);
-				wm->event_stack = FALSE;
 				return TRUE;
 			}
 		} else if (wm->mode == GNT_KP_MODE_RESIZE) {
@@ -1317,7 +1313,6 @@
 			if (oh != h || ow != w) {
 				gnt_screen_resize_widget(widget, w, h);
 				window_reverse(widget, TRUE, wm);
-				wm->event_stack = FALSE;
 				return TRUE;
 			}
 		}
@@ -1325,7 +1320,6 @@
 			window_reverse(widget, FALSE, wm);
 			wm->mode = GNT_KP_MODE_NORMAL;
 		}
-		wm->event_stack = FALSE;
 		return TRUE;
 	}
 
@@ -1333,7 +1327,6 @@
 	if (strcmp(keys, "\033") == 0) {
 		if (wm->_list.window) {
 			gnt_widget_destroy(wm->_list.window);
-			wm->event_stack = FALSE;
 			return TRUE;
 		}
 	} else if (keys[0] == '\033' && isdigit(keys[1]) && keys[2] == '\0') {
@@ -1356,7 +1349,6 @@
 		ret = gnt_widget_key_pressed(wm->_list.window, keys);
 	else if (wm->ordered)
 		ret = gnt_widget_key_pressed(GNT_WIDGET(wm->ordered->data), keys);
-	wm->event_stack = FALSE;
 	return ret;
 }
 
@@ -1542,3 +1534,8 @@
 	g_signal_emit(wm, signals[SIG_GIVE_FOCUS], 0, widget);
 }
 
+void gnt_wm_set_event_stack(GntWM *wm, gboolean set)
+{
+	wm->event_stack = set;
+}
+
--- a/finch/libgnt/gntwm.h	Fri Apr 20 07:05:49 2007 +0000
+++ b/finch/libgnt/gntwm.h	Fri Apr 20 11:53:43 2007 +0000
@@ -164,6 +164,8 @@
 
 void gnt_wm_raise_window(GntWM *wm, GntWidget *widget);
 
+void gnt_wm_set_event_stack(GntWM *wm, gboolean set);
+
 time_t gnt_wm_get_idle_time(void);
 
 G_END_DECLS