Ticket #3160: mc-3160-dialog-hotfocus-misuse.patch

File mc-3160-dialog-hotfocus-misuse.patch, 2.1 KB (added by egmont, 6 years ago)

Fix

  • lib/widget/listbox.c

    diff --git a/lib/widget/listbox.c b/lib/widget/listbox.c
    index b8cc901..ba2670b 100644
    a b listbox_drawscroll (WListbox * l) 
    123123/* --------------------------------------------------------------------------------------------- */ 
    124124 
    125125static void 
    126 listbox_draw (WListbox * l, gboolean focused) 
     126listbox_draw (WListbox * l) 
    127127{ 
    128128    Widget *w = WIDGET (l); 
    129129    const WDialog *h = w->owner; 
    listbox_draw (WListbox * l, gboolean focused) 
    132132    /* *INDENT-OFF* */ 
    133133    int selc = disabled 
    134134        ? DISABLED_COLOR 
    135         : focused 
    136             ? h->color[DLG_COLOR_HOT_FOCUS]  
    137             : h->color[DLG_COLOR_FOCUS]; 
     135        : h->color[DLG_COLOR_FOCUS]; 
    138136    /* *INDENT-ON* */ 
    139137 
    140138    int length = 0; 
    listbox_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void 
    432430        ret_code = listbox_key (l, parm); 
    433431        if (ret_code != MSG_NOT_HANDLED) 
    434432        { 
    435             listbox_draw (l, TRUE); 
     433            listbox_draw (l); 
    436434            send_message (h, w, MSG_ACTION, l->pos, NULL); 
    437435        } 
    438436        return ret_code; 
    listbox_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void 
    445443        send_message (h, w, MSG_ACTION, l->pos, NULL); 
    446444        return MSG_HANDLED; 
    447445 
    448     case MSG_FOCUS: 
    449     case MSG_UNFOCUS: 
    450446    case MSG_DRAW: 
    451         listbox_draw (l, msg != MSG_UNFOCUS); 
     447        listbox_draw (l); 
    452448        return MSG_HANDLED; 
    453449 
    454450    case MSG_DESTROY: 
    listbox_event (Gpm_Event * event, void *data) 
    509505 
    510506        /* We need to refresh ourselves since the dialog manager doesn't */ 
    511507        /* know about this event */ 
    512         listbox_draw (l, TRUE); 
     508        listbox_draw (l); 
    513509        return ret; 
    514510    } 
    515511 
  • misc/skins/sand256.ini

    diff --git a/misc/skins/sand256.ini b/misc/skins/sand256.ini
    index 456f7c8..873a138 100644
    a b  
    133133 
    134134[popupmenu] 
    135135    _default_ = black;rgb553 
    136     menusel = ;rgb452;underline 
     136    menusel = ;rgb452 
    137137    menutitle = ;;underline 
    138138 
    139139[buttonbar]