diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-30 19:33:57 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-03-30 20:34:00 -0400 |
commit | 746e3759b7a350a5e9124f365cac0279810781d1 (patch) | |
tree | c2ba01faee4ab57b10d58db19e590360d5bc4a98 /rootston/cursor.c | |
parent | 168f65fb7a336c7f7067bfd56413b2d19556c8bf (diff) |
Address review feedback
Diffstat (limited to 'rootston/cursor.c')
-rw-r--r-- | rootston/cursor.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c index 1a7526d1..1ee195c2 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -101,18 +101,21 @@ static void seat_view_deco_button(struct roots_seat_view *view, double sx, static void roots_passthrough_cursor(struct roots_cursor *cursor, uint32_t time) { - struct roots_view *view; double sx, sy; - + struct roots_view *view = NULL; struct roots_seat *seat = cursor->seat; struct roots_desktop *desktop = seat->input->server->desktop; struct wlr_surface *surface = desktop_surface_at(desktop, cursor->cursor->x, cursor->cursor->y, &sx, &sy, &view); + struct wl_client *client = NULL; + if (surface) { + client = wl_resource_get_client(surface->resource); + } - if (!surface && cursor->cursor_client) { + if (cursor->cursor_client != client) { wlr_xcursor_manager_set_cursor_image(cursor->xcursor_manager, cursor->default_xcursor, cursor->cursor); - cursor->cursor_client = NULL; + cursor->cursor_client = client; } if (view) { |