Merge pull request #981 from emersion/fix-lingering-hw-cursor

output: fix lingering hardware cursors
This commit is contained in:
Drew DeVault 2018-05-15 14:17:17 -04:00 committed by GitHub
commit 5758498831
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -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) {
// 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;