opt: redetect pointer enter after animaiton end
This commit is contained in:
11
main.c
11
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++;
|
||||
|
||||
Reference in New Issue
Block a user