fix resize, move and border bugs
This commit is contained in:
+10
-8
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user