From 7c98b1ce844e6b73a61edb0cb0f8d1d43664da4e Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Thu, 13 Feb 2025 16:48:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E7=94=BB=E7=BB=93=E6=9D=9F=E5=90=8E?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=A3=80=E6=B5=8B=E6=8C=87=E9=92=88=E8=81=9A?= =?UTF-8?q?=E7=84=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sf --- main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/main.c b/main.c index 7f7ae91b..3272f273 100644 --- a/main.c +++ b/main.c @@ -725,6 +725,9 @@ bool client_animation_next_tick(Client *c) { double animation_passed = (double)c->animation.passed_frames / c->animation.total_frames; double factor = find_animation_curve_at(animation_passed); + Client *pointer_c = NULL; + double sx = 0, sy = 0; + struct wlr_surface *surface = NULL; uint32_t width = c->animation.initial.width + (c->current.width - c->animation.initial.width) * factor; @@ -774,6 +777,14 @@ bool client_animation_next_tick(Client *c) { c->animation.tagouted = true; c->animation.current = c->geom; } + + xytonode(cursor->x, cursor->y, NULL, &pointer_c, NULL, &sx, &sy); + + surface = pointer_c && pointer_c == c ? client_surface(pointer_c) : NULL; + if(surface && pointer_c == selmon->sel) { + wlr_seat_pointer_notify_enter(seat, surface, sx, sy); + } + return false; } else { c->animation.passed_frames++;