diff options
author | emersion <contact@emersion.fr> | 2018-01-26 22:11:09 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-01-26 22:11:09 +0100 |
commit | ece2c1e4e200192bde19a2590b5a31f244e09524 (patch) | |
tree | d8b2bb12b076bf73b70c21b2283ded34fedaee86 /backend/drm | |
parent | a98ece68d32031dbd81b0064fad659515fc09f76 (diff) |
Damage tracking for transformed outputs
Diffstat (limited to 'backend/drm')
-rw-r--r-- | backend/drm/drm.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 4ba36bc4..5ab51e82 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -581,15 +581,14 @@ static bool wlr_drm_connector_set_cursor(struct wlr_output *output, } struct wlr_box hotspot = { - .width = plane->surf.width, - .height = plane->surf.height, .x = hotspot_x, .y = hotspot_y, }; enum wl_output_transform transform = wlr_output_transform_invert(output->transform); struct wlr_box transformed_hotspot; - wlr_box_transform(&hotspot, transform, &transformed_hotspot); + wlr_box_transform(&hotspot, transform, + plane->surf.width, plane->surf.height, &transformed_hotspot); plane->cursor_hotspot_x = transformed_hotspot.x; plane->cursor_hotspot_y = transformed_hotspot.y; @@ -650,15 +649,15 @@ static bool wlr_drm_connector_move_cursor(struct wlr_output *output, } struct wlr_drm_plane *plane = conn->crtc->cursor; - struct wlr_box box; - box.x = x; - box.y = y; - wlr_output_effective_resolution(output, &box.width, &box.height); + struct wlr_box box = { .x = x, .y = y }; + + int width, height; + wlr_output_effective_resolution(output, &width, &height); enum wl_output_transform transform = wlr_output_transform_invert(output->transform); struct wlr_box transformed_box; - wlr_box_transform(&box, transform, &transformed_box); + wlr_box_transform(&box, transform, width, height, &transformed_box); if (plane != NULL) { transformed_box.x -= plane->cursor_hotspot_x; |