mirror of
https://github.com/labwc/labwc.git
synced 2026-04-20 06:46:53 -04:00
menu: fix non-matched accelerators triggering exec
This commit is contained in:
parent
7575623db8
commit
9108809578
1 changed files with 2 additions and 5 deletions
|
|
@ -1507,15 +1507,12 @@ menu_item_select_by_accelerator(char accelerator)
|
||||||
if (next_selection) {
|
if (next_selection) {
|
||||||
menu_process_item_selection(next_selection);
|
menu_process_item_selection(next_selection);
|
||||||
if (needs_exec && next_selection->submenu) {
|
if (needs_exec && next_selection->submenu) {
|
||||||
/*
|
/* Since we can't execute a submenu, enter it instead. */
|
||||||
* Submenu was opened, select the first menuitem
|
|
||||||
* without executing
|
|
||||||
*/
|
|
||||||
needs_exec = false;
|
needs_exec = false;
|
||||||
menu_submenu_enter();
|
menu_submenu_enter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return needs_exec;
|
return matched && needs_exec;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue