From 70cecc866707870518d66278a658eb72665501b2 Mon Sep 17 00:00:00 2001 From: Ry Date: Tue, 24 Jan 2023 17:09:34 -0800 Subject: [PATCH] kernel: Always show the menu bar, even if the active window has none --- kernel/window/event_manager_task.asm | 2 -- kernel/window/window.asm | 10 ---------- 2 files changed, 12 deletions(-) diff --git a/kernel/window/event_manager_task.asm b/kernel/window/event_manager_task.asm index b77927d..3a48311 100644 --- a/kernel/window/event_manager_task.asm +++ b/kernel/window/event_manager_task.asm @@ -138,8 +138,6 @@ event_manager_task_mouse_event_inactive_window_was_clicked: call window_list_offset_to_struct call get_window_menu_bar_root_struct call enable_menu_bar - cmp r0, 0 - ifz call disable_menu_bar call clear_menu_bar mov r1, 0xFFFFFFFF cmp r0, 0 diff --git a/kernel/window/window.asm b/kernel/window/window.asm index a7bd18b..42b99c4 100644 --- a/kernel/window/window.asm +++ b/kernel/window/window.asm @@ -136,8 +136,6 @@ new_window: push r0 call enable_menu_bar mov r0, r6 - cmp r0, 0 - ifz call disable_menu_bar call clear_menu_bar mov r1, 0xFFFFFFFF cmp r0, 0 @@ -209,19 +207,11 @@ destroy_window: call window_list_offset_to_struct call get_window_menu_bar_root_struct call enable_menu_bar - cmp r0, 0 - ifz call disable_menu_bar call clear_menu_bar mov r1, 0xFFFFFFFF cmp r0, 0 ifnz call draw_menu_bar_root_items - - pop r1 - pop r0 - ret destroy_window_no_more_windows: - call disable_menu_bar - pop r1 pop r0 ret