mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-03 06:46:38 -04:00
fix: prevent crash when touch motion occurs over layer surfaces
This commit is contained in:
parent
ad55132a56
commit
455a85723d
1 changed files with 10 additions and 4 deletions
|
|
@ -5364,11 +5364,17 @@ void touchmotion(struct wl_listener *listener, void *data) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (c->type == XDGShell || c->type == X11) {
|
||||||
sx = lx - c->current.x;
|
sx = lx - c->current.x;
|
||||||
sy = ly - c->current.y;
|
sy = ly - c->current.y;
|
||||||
|
|
||||||
if (sloppyfocus)
|
if (sloppyfocus)
|
||||||
focusclient(c, 0);
|
focusclient(c, 0);
|
||||||
|
} else {
|
||||||
|
LayerSurface *l = (LayerSurface *)c;
|
||||||
|
sx = lx - l->current.x;
|
||||||
|
sy = ly - l->current.y;
|
||||||
|
}
|
||||||
|
|
||||||
wlr_seat_touch_point_focus(seat, surface, event->time_msec, event->touch_id,
|
wlr_seat_touch_point_focus(seat, surface, event->time_msec, event->touch_id,
|
||||||
sx, sy);
|
sx, sy);
|
||||||
wlr_seat_touch_notify_motion(seat, event->time_msec, event->touch_id, sx,
|
wlr_seat_touch_notify_motion(seat, event->time_msec, event->touch_id, sx,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue