fix resize, move and border bugs

This commit is contained in:
2026-04-01 17:42:16 +07:00
parent 32028bae98
commit 698e89685c
7 changed files with 24 additions and 127 deletions
+10 -8
View File
@@ -127,6 +127,16 @@ static void process_cursor_resize(struct absinthe_server *server) {
void process_cursor_motion(struct absinthe_server *server, uint32_t time)
{
double sx, sy;
struct wlr_seat *seat = server->seat;
struct wlr_surface *surface = NULL;
struct absinthe_toplevel *toplevel = absinthe_toplevel_at(server, server->cursor->x, server->cursor->y, &surface, &sx, &sy);
if (!toplevel) {
wlr_cursor_set_xcursor(server->cursor, server->cursor_mgr, "default");
return;
}
if (server->cursor_mode == ABSINTHE_CURSOR_MOVE) {
process_cursor_move(server);
return;
@@ -135,14 +145,6 @@ void process_cursor_motion(struct absinthe_server *server, uint32_t time)
return;
}
double sx, sy;
struct wlr_seat *seat = server->seat;
struct wlr_surface *surface = NULL;
struct absinthe_toplevel *toplevel = absinthe_toplevel_at(server, server->cursor->x, server->cursor->y, &surface, &sx, &sy);
if (!toplevel)
wlr_cursor_set_xcursor(server->cursor, server->cursor_mgr, "default");
if (surface) {
wlr_seat_pointer_notify_enter(seat, surface, sx, sy);
wlr_seat_pointer_notify_motion(seat, time, sx, sy);