Remove window before choosing new active window
This commit is contained in:
parent
e28c2c3cdc
commit
84c3eabdbc
|
@ -179,6 +179,12 @@ destroy_window:
|
||||||
|
|
||||||
mov r2, r0
|
mov r2, r0
|
||||||
|
|
||||||
|
; remove the window from the window list
|
||||||
|
call search_for_window_list_entry
|
||||||
|
mul r0, 4
|
||||||
|
add r0, window_list
|
||||||
|
mov [r0], 0
|
||||||
|
|
||||||
; set the active window to whatever entry is found first
|
; set the active window to whatever entry is found first
|
||||||
call search_for_nonempty_window_list_entry
|
call search_for_nonempty_window_list_entry
|
||||||
mov.8 [active_window_offset], r0
|
mov.8 [active_window_offset], r0
|
||||||
|
@ -191,6 +197,7 @@ destroy_window:
|
||||||
call swap_windows
|
call swap_windows
|
||||||
|
|
||||||
; set the menu bar for the newly active window
|
; set the menu bar for the newly active window
|
||||||
|
mov r0, r2
|
||||||
call get_window_menu_bar_root_struct
|
call get_window_menu_bar_root_struct
|
||||||
call enable_menu_bar
|
call enable_menu_bar
|
||||||
call clear_menu_bar
|
call clear_menu_bar
|
||||||
|
@ -212,14 +219,6 @@ destroy_window_no_more_windows:
|
||||||
movz.8 r0, [r2]
|
movz.8 r0, [r2]
|
||||||
call disable_overlay
|
call disable_overlay
|
||||||
|
|
||||||
; remove the window from the window list
|
|
||||||
sub r2, 24
|
|
||||||
mov r0, r2
|
|
||||||
call search_for_window_list_entry
|
|
||||||
mul r0, 4
|
|
||||||
add r0, window_list
|
|
||||||
mov [r0], 0
|
|
||||||
|
|
||||||
pop r2
|
pop r2
|
||||||
pop r1
|
pop r1
|
||||||
pop r0
|
pop r0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user