kernel: Fix clicking menu item when different window is directly under
This commit is contained in:
parent
fddfd78829
commit
455a909255
|
@ -35,6 +35,8 @@ event_manager_task_loop:
|
||||||
ifz call add_event_to_active_window
|
ifz call add_event_to_active_window
|
||||||
cmp r0, EVENT_TYPE_MENU_CLICK
|
cmp r0, EVENT_TYPE_MENU_CLICK
|
||||||
ifz call add_event_to_active_window
|
ifz call add_event_to_active_window
|
||||||
|
cmp r0, EVENT_TYPE_MENU_ACK
|
||||||
|
ifz call add_event_to_active_window
|
||||||
cmp r0, EVENT_TYPE_MENU_UPDATE
|
cmp r0, EVENT_TYPE_MENU_UPDATE
|
||||||
ifz call add_event_to_active_window
|
ifz call add_event_to_active_window
|
||||||
|
|
||||||
|
@ -58,6 +60,18 @@ event_manager_task_mouse_event:
|
||||||
push r1
|
push r1
|
||||||
push r2
|
push r2
|
||||||
|
|
||||||
|
; if a menu is open, don't continue
|
||||||
|
; this is hacky as fuck
|
||||||
|
push r0
|
||||||
|
in r0, 0x8000031D ; overlay 29: enable status
|
||||||
|
cmp r0, 0
|
||||||
|
ifnz pop r0
|
||||||
|
ifnz pop r2
|
||||||
|
ifnz pop r1
|
||||||
|
ifnz pop r0
|
||||||
|
ifnz ret
|
||||||
|
pop r0
|
||||||
|
|
||||||
; find which overlay was clicked on
|
; find which overlay was clicked on
|
||||||
mov r0, r1
|
mov r0, r1
|
||||||
mov r1, r2
|
mov r1, r2
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
; given a position on screen, find which enabled overlay (if any) is covering it
|
; given a position on screen, find which enabled overlay (if any) is covering it
|
||||||
; if multiple overlays are covering the same position, the highest priority one will be returned
|
; if multiple overlays are covering the same position, the highest priority one will be returned
|
||||||
; overlay 31 (the mouse cursor) is ignored
|
; overlays 31, 30, and 29 (mouse cursor, menu bar, menu) are ignored
|
||||||
; inputs:
|
; inputs:
|
||||||
; r0: X coordinate
|
; r0: X coordinate
|
||||||
; r1: Y coordinate
|
; r1: Y coordinate
|
||||||
|
@ -12,7 +12,7 @@ find_overlay_convering_position:
|
||||||
push r2
|
push r2
|
||||||
push r31
|
push r31
|
||||||
|
|
||||||
mov r31, 31
|
mov r31, 29
|
||||||
find_overlay_convering_position_loop:
|
find_overlay_convering_position_loop:
|
||||||
mov r2, r31
|
mov r2, r31
|
||||||
dec r2
|
dec r2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user