Ticket #3571: 3571-Fix-for-Fix-menu-handling.patch

File 3571-Fix-for-Fix-menu-handling.patch, 1.5 KB (added by mooffie, 9 years ago)
  • lib/widget/dialog.c

    From 878cdfa311095dd0aae29346dc183c55f852d8bb Mon Sep 17 00:00:00 2001
    From: Mooffie <mooffie@gmail.com>
    Date: Thu, 24 Mar 2016 14:52:14 +0200
    Subject: [PATCH] Fix for "Fix menu handling".
    
    ---
     lib/widget/dialog.c | 6 ++----
     1 file changed, 2 insertions(+), 4 deletions(-)
    
    diff --git a/lib/widget/dialog.c b/lib/widget/dialog.c
    index 5855750..8fa00fc 100644
    a b dlg_set_top_or_bottom_widget (void *w, gboolean set_top) 
    11011101        abort ();               /* widget is not in dialog, this should not happen */ 
    11021102 
    11031103    /* unfocus prevoius widget and focus current one before widget reordering */ 
    1104     if (h->state == DLG_ACTIVE) 
     1104    if (set_top && h->state == DLG_ACTIVE) 
    11051105        do_select_widget (h, l, SELECT_EXACT); 
    11061106 
    11071107    /* widget reordering */ 
    dlg_set_top_or_bottom_widget (void *w, gboolean set_top) 
    11101110        h->widgets = g_list_concat (h->widgets, l); 
    11111111    else 
    11121112        h->widgets = g_list_concat (l, h->widgets); 
    1113     h->current = l; 
    11141113} 
    11151114 
    11161115/* --------------------------------------------------------------------------------------------- */ 
    dlg_set_top_widget (void *w) 
    11261125 
    11271126/* --------------------------------------------------------------------------------------------- */ 
    11281127/** 
    1129  * Set widget at bottom of widget list (and make it current, albeit 
    1130  * typically you'd want to switch to some other widget right after). 
     1128 * Set widget at bottom of widget list. 
    11311129 */ 
    11321130 
    11331131void