aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-10-21 19:19:02 +0200
committerGitHub <noreply@github.com>2018-10-21 19:19:02 +0200
commit6c7e0e48b1e67f48e2a730abd1a61abd75b6e7e3 (patch)
tree9f54313e5fdc70d3bff9a1b373ae17baa6333194
parente0cf97da6965cb7717742efa7be93ed4233e53aa (diff)
parent8d0997a5e70d3c110add04bca70657204490bd23 (diff)
Merge pull request #1289 from ixru/fix-cursor-visibility
Fix cursor visibility on surface commit
-rw-r--r--types/wlr_output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/types/wlr_output.c b/types/wlr_output.c
index 7bcf2556..57503d97 100644
--- a/types/wlr_output.c
+++ b/types/wlr_output.c
@@ -853,6 +853,7 @@ static void output_cursor_commit(struct wlr_output_cursor *cursor,
cursor->enabled = wlr_surface_has_buffer(surface);
cursor->width = surface->current.width * cursor->output->scale;
cursor->height = surface->current.height * cursor->output->scale;
+ output_cursor_update_visible(cursor);
if (update_hotspot) {
cursor->hotspot_x -= surface->current.dx * cursor->output->scale;
cursor->hotspot_y -= surface->current.dy * cursor->output->scale;
@@ -915,10 +916,9 @@ void wlr_output_cursor_set_surface(struct wlr_output_cursor *cursor,
if (surface != NULL) {
wl_signal_add(&surface->events.commit, &cursor->surface_commit);
wl_signal_add(&surface->events.destroy, &cursor->surface_destroy);
- output_cursor_commit(cursor, false);
cursor->visible = false;
- output_cursor_update_visible(cursor);
+ output_cursor_commit(cursor, false);
} else {
cursor->enabled = false;
cursor->width = 0;