mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-09 13:29:54 -05:00
opt: redetect pointer enter after animaiton end
This commit is contained in:
parent
65b7174487
commit
7b2db2a464
1 changed files with 11 additions and 0 deletions
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++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue