aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-11-01 10:57:24 +0100
committeremersion <contact@emersion.fr>2017-11-01 11:01:18 +0100
commit510ce27fb75f53cd83d23e660cd45031cf2b937a (patch)
tree0eab9672c73076c485b9254759e44e5eeb35dc39
parent0beae99188d7885bed15eef548acf6b2a9fb9f79 (diff)
Re-enable hardware cursors
-rw-r--r--types/wlr_output.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/types/wlr_output.c b/types/wlr_output.c
index 15b2f402..08d32963 100644
--- a/types/wlr_output.c
+++ b/types/wlr_output.c
@@ -503,21 +503,12 @@ void wlr_output_cursor_destroy(struct wlr_output_cursor *cursor) {
void wlr_output_transform_apply_to_box(enum wl_output_transform transform,
struct wlr_box *box, struct wlr_box *dest) {
- switch (transform) {
- case WL_OUTPUT_TRANSFORM_NORMAL:
- case WL_OUTPUT_TRANSFORM_180:
- case WL_OUTPUT_TRANSFORM_FLIPPED:
- case WL_OUTPUT_TRANSFORM_FLIPPED_180:
+ if (transform % 2 == 0) {
dest->width = box->width;
dest->height = box->height;
- break;
- case WL_OUTPUT_TRANSFORM_90:
- case WL_OUTPUT_TRANSFORM_270:
- case WL_OUTPUT_TRANSFORM_FLIPPED_90:
- case WL_OUTPUT_TRANSFORM_FLIPPED_270:
+ } else {
dest->width = box->height;
dest->height = box->width;
- break;
}
switch (transform) {
@@ -552,5 +543,6 @@ void wlr_output_transform_apply_to_box(enum wl_output_transform transform,
case WL_OUTPUT_TRANSFORM_FLIPPED_270:
dest->x = box->height - box->y;
dest->y = box->width - box->x;
+ break;
}
}