aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-10-29 09:09:21 +0100
committeremersion <contact@emersion.fr>2017-10-31 12:30:03 +0100
commit1b6c7293608717943a296675b1ab228fed72277c (patch)
treedbc92b6f293877f5dbec51e502c92c090ac2dcc4 /backend
parente9c2cf09dcf1ac41b66d70ecdaf37a629aa4d7cf (diff)
Add wlr_output_cursor
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/drm.c61
1 files changed, 31 insertions, 30 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 27a8490c..e3f2bfe1 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -558,36 +558,37 @@ static bool wlr_drm_connector_set_cursor(struct wlr_output *output,
}
}
- switch (output->transform) {
- case WL_OUTPUT_TRANSFORM_90:
- output->cursor.hotspot_x = hotspot_x;
- output->cursor.hotspot_y = -plane->surf.height + hotspot_y;
- break;
- case WL_OUTPUT_TRANSFORM_180:
- output->cursor.hotspot_x = plane->surf.width - hotspot_x;
- output->cursor.hotspot_y = plane->surf.height - hotspot_y;
- break;
- case WL_OUTPUT_TRANSFORM_270:
- output->cursor.hotspot_x = -plane->surf.height + hotspot_x;
- output->cursor.hotspot_y = hotspot_y;
- break;
- case WL_OUTPUT_TRANSFORM_FLIPPED:
- output->cursor.hotspot_x = plane->surf.width - hotspot_x;
- output->cursor.hotspot_y = hotspot_y;
- break;
- case WL_OUTPUT_TRANSFORM_FLIPPED_90:
- output->cursor.hotspot_x = hotspot_x;
- output->cursor.hotspot_y = -hotspot_y;
- break;
- case WL_OUTPUT_TRANSFORM_FLIPPED_180:
- output->cursor.hotspot_x = hotspot_x;
- output->cursor.hotspot_y = plane->surf.height - hotspot_y;
- break;
- case WL_OUTPUT_TRANSFORM_FLIPPED_270:
- output->cursor.hotspot_x = -plane->surf.height + hotspot_x;
- output->cursor.hotspot_y = plane->surf.width - hotspot_y;
- break;
- }
+ // TODO: this doesn't belong here
+ // switch (output->transform) {
+ // case WL_OUTPUT_TRANSFORM_90:
+ // output->cursor.hotspot_x = hotspot_x;
+ // output->cursor.hotspot_y = -plane->surf.height + hotspot_y;
+ // break;
+ // case WL_OUTPUT_TRANSFORM_180:
+ // output->cursor.hotspot_x = plane->surf.width - hotspot_x;
+ // output->cursor.hotspot_y = plane->surf.height - hotspot_y;
+ // break;
+ // case WL_OUTPUT_TRANSFORM_270:
+ // output->cursor.hotspot_x = -plane->surf.height + hotspot_x;
+ // output->cursor.hotspot_y = hotspot_y;
+ // break;
+ // case WL_OUTPUT_TRANSFORM_FLIPPED:
+ // output->cursor.hotspot_x = plane->surf.width - hotspot_x;
+ // output->cursor.hotspot_y = hotspot_y;
+ // break;
+ // case WL_OUTPUT_TRANSFORM_FLIPPED_90:
+ // output->cursor.hotspot_x = hotspot_x;
+ // output->cursor.hotspot_y = -hotspot_y;
+ // break;
+ // case WL_OUTPUT_TRANSFORM_FLIPPED_180:
+ // output->cursor.hotspot_x = hotspot_x;
+ // output->cursor.hotspot_y = plane->surf.height - hotspot_y;
+ // break;
+ // case WL_OUTPUT_TRANSFORM_FLIPPED_270:
+ // output->cursor.hotspot_x = -plane->surf.height + hotspot_x;
+ // output->cursor.hotspot_y = plane->surf.width - hotspot_y;
+ // break;
+ // }
if (!update_pixels) {
// Only update the cursor hotspot