From a951fbb2645105f8d34e76a2ef5d579bec205d52 Mon Sep 17 00:00:00 2001 From: emersion Date: Wed, 7 Mar 2018 10:22:39 +0100 Subject: output: don't move hidden cursors When using the DRM backend and multiple outputs, that reduces the number of commits. --- types/wlr_output.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- cgit v1.2.3