From 7575623db8fe320f030679a266a3918817b196cb Mon Sep 17 00:00:00 2001 From: Alex Chernika Date: Fri, 10 Apr 2026 16:39:07 +0200 Subject: [PATCH] menu: fix codestyle warnings --- src/input/keyboard.c | 3 ++- src/menu/menu.c | 13 ++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/input/keyboard.c b/src/input/keyboard.c index 8d9266b8..f48c4dce 100644 --- a/src/input/keyboard.c +++ b/src/input/keyboard.c @@ -420,7 +420,8 @@ handle_change_vt_key(struct keyboard *keyboard, } static char -keysym_to_char(uint32_t keysym) { +keysym_to_char(uint32_t keysym) +{ if (keysym >= 0x0020 && keysym <= 0x00FF) { return (char)keysym; } diff --git a/src/menu/menu.c b/src/menu/menu.c index c1169a2a..b7534088 100644 --- a/src/menu/menu.c +++ b/src/menu/menu.c @@ -1495,8 +1495,10 @@ menu_item_select_by_accelerator(char accelerator) next_selection = item; matched = true; } else if (matched && item->accelerator == accelerator) { - /* Another menuentry with such accelerator found, - cycle selection instead of executing */ + /* + * Another menuentry with such accelerator found, + * cycle selection instead of executing + */ needs_exec = false; break; } @@ -1505,8 +1507,10 @@ menu_item_select_by_accelerator(char accelerator) if (next_selection) { menu_process_item_selection(next_selection); if (needs_exec && next_selection->submenu) { - /* Submenu was opened, select the first menuitem - without executing */ + /* + * Submenu was opened, select the first menuitem + * without executing + */ needs_exec = false; menu_submenu_enter(); } @@ -1514,7 +1518,6 @@ menu_item_select_by_accelerator(char accelerator) return needs_exec; } - bool menu_call_selected_actions(void) {