changeset 21626:4c03275346a9

Fix moving focus in an internal box.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 26 Nov 2007 04:45:41 +0000
parents e5606c720791
children 9f7590a24b9b
files finch/libgnt/gntbox.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntbox.c	Fri Nov 23 11:05:43 2007 +0000
+++ b/finch/libgnt/gntbox.c	Mon Nov 26 04:45:41 2007 +0000
@@ -851,8 +851,14 @@
 
 void gnt_box_give_focus_to_child(GntBox *box, GntWidget *widget)
 {
-	GList *find = g_list_find(box->focus, widget);
-	gpointer now = box->active;
+	GList *find;
+	gpointer now;
+
+	while (GNT_WIDGET(box)->parent)
+		box = GNT_BOX(GNT_WIDGET(box)->parent);
+
+	find = g_list_find(box->focus, widget);
+	now = box->active;
 	if (find)
 		box->active = widget;
 	if (now && now != box->active)