fix resizing and moving window when cursor is not inside of it
This commit is contained in:
+3
-2
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user