cursor: fix focus when menu is closed by clicking its border

Before this commit, the pointer focus is cleared when a menu is closed
by clicking its border. This is because get_cursor_context() returns
type=LAB_SSD_NONE when the cursor is on the menu border and
cursor_update_common() clears the pointer focus. This commit fixes this
by replacing cursor_update_common() with cursor_update_focus(), which
calls get_cursor_context() again after the menu scene-node is hidden.
This commit is contained in:
tokyo4j 2024-12-19 17:04:10 +09:00 committed by Hiroaki Yamamoto
parent e707e16130
commit b2a45ac8af

View file

@ -1118,9 +1118,7 @@ cursor_process_button_release(struct seat *seat, uint32_t button,
menu_call_selected_actions(server); menu_call_selected_actions(server);
} else { } else {
menu_close_root(server); menu_close_root(server);
double sx, sy; cursor_update_focus(server);
cursor_update_common(server, &ctx, time_msec,
/*cursor_has_moved*/ false, &sx, &sy);
} }
} }
return notify; return notify;