mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-03 06:46:38 -04:00
opt: remove sloppyfocus guards from touch focus
This commit is contained in:
parent
193e0f3b31
commit
6283bc1a3d
1 changed files with 3 additions and 4 deletions
|
|
@ -5262,7 +5262,7 @@ void touchdown(struct wl_listener *listener, void *data) {
|
||||||
/* Find the client under the pointer and send the event along. */
|
/* Find the client under the pointer and send the event along. */
|
||||||
xytonode(lx, ly, &surface, &c, NULL, &sx, &sy);
|
xytonode(lx, ly, &surface, &c, NULL, &sx, &sy);
|
||||||
if (surface != NULL && wlr_surface_accepts_touch(surface, seat)) {
|
if (surface != NULL && wlr_surface_accepts_touch(surface, seat)) {
|
||||||
if (sloppyfocus && c)
|
if (c)
|
||||||
focusclient(c, 0);
|
focusclient(c, 0);
|
||||||
|
|
||||||
wlr_seat_touch_notify_down(seat, surface, event->time_msec,
|
wlr_seat_touch_notify_down(seat, surface, event->time_msec,
|
||||||
|
|
@ -5362,7 +5362,7 @@ void touchmotion(struct wl_listener *listener, void *data) {
|
||||||
sy = ly - node_y;
|
sy = ly - node_y;
|
||||||
|
|
||||||
toplevel_from_wlr_surface(surface, &c, NULL);
|
toplevel_from_wlr_surface(surface, &c, NULL);
|
||||||
if (sloppyfocus && c)
|
if (c)
|
||||||
focusclient(c, 0);
|
focusclient(c, 0);
|
||||||
|
|
||||||
wlr_seat_touch_point_focus(seat, surface, event->time_msec,
|
wlr_seat_touch_point_focus(seat, surface, event->time_msec,
|
||||||
|
|
@ -5372,8 +5372,7 @@ void touchmotion(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
||||||
} else {
|
} else {
|
||||||
if (sloppyfocus)
|
focusclient(NULL, 0);
|
||||||
focusclient(NULL, 0);
|
|
||||||
wlr_seat_touch_point_clear_focus(seat, event->time_msec,
|
wlr_seat_touch_point_clear_focus(seat, event->time_msec,
|
||||||
event->touch_id);
|
event->touch_id);
|
||||||
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue