fix resizing and moving window when cursor is not inside of it

This commit is contained in:
2026-04-03 12:43:17 +07:00
parent 698e89685c
commit 7e3ca8238c
2 changed files with 15 additions and 14 deletions
+3 -2
View File
@@ -149,8 +149,9 @@ void server_cursor_button(struct wl_listener *listener, void *data)
double sx, sy;
struct wlr_surface *surface = NULL;
struct absinthe_toplevel *toplevel = absinthe_toplevel_at(server, server->cursor->x, server->cursor->y, &surface, &sx, &sy);
focus_toplevel(toplevel);
if (toplevel) {
struct wlr_keyboard *keyboard = wlr_seat_get_keyboard(server->seat);
uint32_t mods = wlr_keyboard_get_modifiers(keyboard);
if (mods & ABSINTHE_CURSOR_MOD) {
@@ -164,7 +165,7 @@ void server_cursor_button(struct wl_listener *listener, void *data)
}
}
if (toplevel) {
focus_toplevel(toplevel);
server->grab_x = server->cursor->x;
server->grab_y = server->cursor->y;