diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-05-15 14:17:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-15 14:17:17 -0400 |
commit | 5758498831875833f5b616140bfca3def763c696 (patch) | |
tree | ded06c2d9aaad7538eed4f7987eca0b809b48a2e | |
parent | 9e6d9779a069fdd76642be09f61bf1d13b411205 (diff) | |
parent | dbba1311b7f957aea0296a8dc8098b65476ed6b4 (diff) |
Merge pull request #981 from emersion/fix-lingering-hw-cursor
output: fix lingering hardware cursors
-rw-r--r-- | types/wlr_output.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/types/wlr_output.c b/types/wlr_output.c index 350538a7..a0f27e51 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -706,11 +706,11 @@ static bool output_cursor_attempt_hardware(struct wlr_output_cursor *cursor) { struct wlr_output_cursor *hwcur = cursor->output->hardware_cursor; if (cursor->output->impl->set_cursor && (hwcur == NULL || hwcur == cursor)) { - if (hwcur != cursor) { - assert(cursor->output->impl->move_cursor); - cursor->output->impl->move_cursor(cursor->output, - (int)cursor->x, (int)cursor->y); - } + // If the cursor was hidden or was a software cursor, the hardware + // cursor position is outdated + assert(cursor->output->impl->move_cursor); + cursor->output->impl->move_cursor(cursor->output, + (int)cursor->x, (int)cursor->y); if (cursor->output->impl->set_cursor(cursor->output, texture, scale, transform, cursor->hotspot_x, cursor->hotspot_y, true)) { cursor->output->hardware_cursor = cursor; |