From 6710dbd82a6022348a399ff68770c25e25c1c03c Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Mon, 31 Mar 2025 13:33:23 +0800 Subject: [PATCH] opt: optimize pointer focus reset in warp focus --- maomao.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/maomao.c b/maomao.c index fd9a99f..24727af 100644 --- a/maomao.c +++ b/maomao.c @@ -6613,11 +6613,11 @@ 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) + cursor->y < c->geom.y || cursor->y > c->geom.y + c->geom.height) { 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); - + motionnotify(0, NULL, 0, 0, 0, 0); + } } void warp_cursor_to_selmon(const Monitor *m) {