changeset 21213:4d6828b8da3e

Toplevel boxes don't have menus.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 03 Oct 2007 07:09:03 +0000
parents b65f1bff6412
children 05bb2853f350
files finch/libgnt/gntwm.c
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntwm.c	Wed Oct 03 06:51:26 2007 +0000
+++ b/finch/libgnt/gntwm.c	Wed Oct 03 07:09:03 2007 +0000
@@ -1855,11 +1855,13 @@
 		ret = gnt_widget_key_pressed(wm->_list.window, keys);
 	else if (wm->cws->ordered) {
 		GntWidget *win = wm->cws->ordered->data;
-		GntMenu *menu = GNT_WINDOW(win)->menu;
-		if (menu) {
-			const char *id = gnt_window_get_accel_item(GNT_WINDOW(win), keys);
-			if (id)
-				ret = (gnt_menu_get_item(menu, id) != NULL);
+		if (GNT_IS_WINDOW(win)) {
+			GntMenu *menu = GNT_WINDOW(win)->menu;
+			if (menu) {
+				const char *id = gnt_window_get_accel_item(GNT_WINDOW(win), keys);
+				if (id)
+					ret = (gnt_menu_get_item(menu, id) != NULL);
+			}
 		}
 		if (!ret)
 			ret = gnt_widget_key_pressed(win, keys);