disable pointer warp

This commit is contained in:
korei999 2024-01-04 01:45:57 +02:00
parent 5adc681b87
commit 56c19349a1
2 changed files with 10 additions and 14 deletions

14
dwl.c
View file

@ -1158,16 +1158,16 @@ void
cursorwarptohint(void)
{
Client *c = NULL;
double sx, sy;
// double sx, sy;
toplevel_from_wlr_surface(active_constraint->surface, &c, NULL);
/* TODO: wlroots 0.18: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4478 */
if (c && (active_constraint->current.committed & WLR_POINTER_CONSTRAINT_V1_STATE_CURSOR_HINT)) {
sx = active_constraint->current.cursor_hint.x + c->mon->m.x + c->bw;
sy = active_constraint->current.cursor_hint.y + c->mon->m.y + c->bw;
wlr_cursor_warp(cursor, NULL, sx - c->geom.x, sy - c->geom.y);
wlr_seat_pointer_warp(seat, sx, sy);
}
// if (c && (active_constraint->current.committed & WLR_POINTER_CONSTRAINT_V1_STATE_CURSOR_HINT)) {
// sx = active_constraint->current.cursor_hint.x + c->mon->m.x + c->bw;
// sy = active_constraint->current.cursor_hint.y + c->mon->m.y + c->bw;
// wlr_cursor_warp(cursor, NULL, sx - c->geom.x, sy - c->geom.y);
// wlr_seat_pointer_warp(seat, sx, sy);
// }
}
void