diff options
author | emersion <contact@emersion.fr> | 2018-03-07 10:22:39 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-03-07 10:22:39 +0100 |
commit | a951fbb2645105f8d34e76a2ef5d579bec205d52 (patch) | |
tree | 7569cf8ef1ed689c8a62af036362eccd69ddeb63 | |
parent | 36dcad13d09d63bd321958ed79d479687479f852 (diff) |
output: don't move hidden cursors
When using the DRM backend and multiple outputs, that reduces the
number of commits.
-rw-r--r-- | types/wlr_output.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/types/wlr_output.c b/types/wlr_output.c index 96c9d324..15bb3577 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -846,12 +846,18 @@ bool wlr_output_cursor_move(struct wlr_output_cursor *cursor, output_cursor_damage_whole(cursor); } + bool was_visible = cursor->visible; x *= cursor->output->scale; y *= cursor->output->scale; cursor->x = x; cursor->y = y; output_cursor_update_visible(cursor); + if (!was_visible && !cursor->visible) { + // Cursor is still hidden, do nothing + return true; + } + if (cursor->output->hardware_cursor != cursor) { output_cursor_damage_whole(cursor); return true; |