* dlg.c: Fix a bug when DLG_HOTKEY_HANDLED would not be
delivered if the current widget already has focus.
Этот коммит содержится в:
родитель
2355c67ada
Коммит
80f4f3f55d
@ -1,3 +1,8 @@
|
||||
2003-09-06 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* dlg.c: Fix a bug when DLG_HOTKEY_HANDLED would not be
|
||||
delivered if the current widget already has focus.
|
||||
|
||||
2003-09-04 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||
|
||||
* user.c (execute_menu_command): Implement %view macro.
|
||||
|
11
src/dlg.c
11
src/dlg.c
@ -611,7 +611,6 @@ static int dlg_try_hotkey (Dlg_head *h, int d_key)
|
||||
if (!handled)
|
||||
return 0;
|
||||
|
||||
(*h->callback) (h, 0, DLG_HOTKEY_HANDLED);
|
||||
previous = h->current;
|
||||
if (!dlg_unfocus (h))
|
||||
return handled;
|
||||
@ -625,7 +624,7 @@ static int dlg_try_hotkey (Dlg_head *h, int d_key)
|
||||
}
|
||||
|
||||
static int
|
||||
dlg_key_event (Dlg_head * h, int d_key)
|
||||
dlg_key_event (Dlg_head *h, int d_key)
|
||||
{
|
||||
int handled;
|
||||
|
||||
@ -648,14 +647,16 @@ dlg_key_event (Dlg_head * h, int d_key)
|
||||
if (!handled)
|
||||
handled = dlg_try_hotkey (h, d_key);
|
||||
|
||||
if (handled)
|
||||
(*h->callback) (h, 0, DLG_HOTKEY_HANDLED);
|
||||
|
||||
/* not used - then try widget_callback */
|
||||
if (!handled)
|
||||
handled |=
|
||||
callback (h) (h->current->widget, WIDGET_KEY, d_key);
|
||||
handled = callback (h) (h->current->widget, WIDGET_KEY, d_key);
|
||||
|
||||
/* not used- try to use the unhandled case */
|
||||
if (!handled)
|
||||
handled |= (*h->callback) (h, d_key, DLG_UNHANDLED_KEY);
|
||||
handled = (*h->callback) (h, d_key, DLG_UNHANDLED_KEY);
|
||||
|
||||
if (!handled)
|
||||
dialog_handle_key (h, d_key);
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user