diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-03 15:58:47 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-03 15:58:47 -0400 |
commit | 2ecce27dd55f66121fc2bca425f45e851bf1ec4c (patch) | |
tree | 97ba6de65f200d24bacf49a2eaf7a30572896a84 /rootston/cursor.c | |
parent | 1e39c37b3c78ea370e9fd870b63da194fc60d8fc (diff) | |
parent | 56deff41b6c2c6190894068994ba403978068bad (diff) |
Merge pull request #807 from swaywm/input-inhibit
Input inhibit
Diffstat (limited to 'rootston/cursor.c')
-rw-r--r-- | rootston/cursor.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c index ac46ff5d..21e32a09 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -111,6 +111,9 @@ static void roots_passthrough_cursor(struct roots_cursor *cursor, if (surface) { client = wl_resource_get_client(surface->resource); } + if (surface && !roots_seat_allow_input(cursor->seat, surface->resource)) { + return; + } if (cursor->cursor_client != client) { wlr_xcursor_manager_set_cursor_image(cursor->xcursor_manager, @@ -327,7 +330,7 @@ void roots_cursor_handle_touch_down(struct roots_cursor *cursor, desktop, lx, ly, &sx, &sy, NULL); uint32_t serial = 0; - if (surface) { + if (surface && roots_seat_allow_input(cursor->seat, surface->resource)) { serial = wlr_seat_touch_notify_down(cursor->seat->seat, surface, event->time_msec, event->touch_id, sx, sy); } @@ -378,7 +381,7 @@ void roots_cursor_handle_touch_motion(struct roots_cursor *cursor, struct wlr_surface *surface = desktop_surface_at( desktop, lx, ly, &sx, &sy, NULL); - if (surface) { + if (surface && roots_seat_allow_input(cursor->seat, surface->resource)) { wlr_seat_touch_point_focus(cursor->seat->seat, surface, event->time_msec, event->touch_id, sx, sy); wlr_seat_touch_notify_motion(cursor->seat->seat, event->time_msec, |