Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

output: fix cursor surface position handling #1074

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions types/wlr_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,6 @@ static void output_cursor_get_box(struct wlr_output_cursor *cursor,
box->y = cursor->y - cursor->hotspot_y;
box->width = cursor->width;
box->height = cursor->height;

if (cursor->surface != NULL) {
box->x += cursor->surface->current->sx * cursor->output->scale;
box->y += cursor->surface->current->sy * cursor->output->scale;
}
}

static void output_cursor_render(struct wlr_output_cursor *cursor,
Expand Down Expand Up @@ -780,6 +775,8 @@ static void output_cursor_commit(struct wlr_output_cursor *cursor) {
cursor->enabled = wlr_surface_has_buffer(cursor->surface);
cursor->width = cursor->surface->current->width * cursor->output->scale;
cursor->height = cursor->surface->current->height * cursor->output->scale;
cursor->x += cursor->surface->current->sx * cursor->output->scale;
cursor->y += cursor->surface->current->sy * cursor->output->scale;

if (output_cursor_attempt_hardware(cursor)) {
struct timespec now;
Expand Down