fix: warpcursor not apply in some case

This commit is contained in:
DreamMaoMao 2026-02-08 11:18:38 +08:00
parent 9b92f139c0
commit 241afb4b97

View file

@ -5989,8 +5989,7 @@ void virtualkeyboard(struct wl_listener *listener, void *data) {
}
void warp_cursor(const Client *c) {
if (cursor->x < c->geom.x || cursor->x > c->geom.x + c->geom.width ||
cursor->y < c->geom.y || cursor->y > c->geom.y + c->geom.height) {
if (INSIDEMON(c)) {
wlr_cursor_warp_closest(cursor, NULL, c->geom.x + c->geom.width / 2.0,
c->geom.y + c->geom.height / 2.0);
motionnotify(0, NULL, 0, 0, 0, 0);