# HG changeset patch # User Sadrul Habib Chowdhury # Date 1196052341 0 # Node ID 4c03275346a9e6afe42ef08736825f70a086eab6 # Parent e5606c720791058d327a0af62b93bc0789c396c4 Fix moving focus in an internal box. diff -r e5606c720791 -r 4c03275346a9 finch/libgnt/gntbox.c --- 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)