From b2a45ac8afed0186a32e0b319c0481b7f16d4d17 Mon Sep 17 00:00:00 2001 From: tokyo4j Date: Thu, 19 Dec 2024 17:04:10 +0900 Subject: [PATCH] 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. --- src/input/cursor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/input/cursor.c b/src/input/cursor.c index 5f76c908..225f836b 100644 --- a/src/input/cursor.c +++ b/src/input/cursor.c @@ -1118,9 +1118,7 @@ cursor_process_button_release(struct seat *seat, uint32_t button, menu_call_selected_actions(server); } else { menu_close_root(server); - double sx, sy; - cursor_update_common(server, &ctx, time_msec, - /*cursor_has_moved*/ false, &sx, &sy); + cursor_update_focus(server); } } return notify;