diff options
author | emersion <contact@emersion.fr> | 2017-12-01 09:49:32 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2017-12-01 09:49:32 +0100 |
commit | 4a56957a37669b38038910b41eb2b128f3a5042e (patch) | |
tree | 69446a6caef78b3812c2307e668d9651143c4872 | |
parent | 6a69b4419fa25f4bbcbe3253ed000276cb6ace42 (diff) |
Fix inverted flipped-90 and flipped-270
-rw-r--r-- | render/matrix.c | 8 | ||||
-rw-r--r-- | types/wlr_box.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/render/matrix.c b/render/matrix.c index 6118e6a5..54dba4cc 100644 --- a/render/matrix.c +++ b/render/matrix.c @@ -105,16 +105,16 @@ static const float transforms[][4] = { 0.0f, 1.0f, }, [WL_OUTPUT_TRANSFORM_FLIPPED_90] = { - 0.0f, 1.0f, - 1.0f, 0.0f, + 0.0f, -1.0f, + -1.0f, 0.0f, }, [WL_OUTPUT_TRANSFORM_FLIPPED_180] = { 1.0f, 0.0f, 0.0f, -1.0f, }, [WL_OUTPUT_TRANSFORM_FLIPPED_270] = { - 0.0f, -1.0f, - -1.0f, 0.0f, + 0.0f, 1.0f, + 1.0f, 0.0f, }, }; diff --git a/types/wlr_box.c b/types/wlr_box.c index 88f4b8ab..5e910b2e 100644 --- a/types/wlr_box.c +++ b/types/wlr_box.c @@ -99,16 +99,16 @@ void wlr_box_transform(struct wlr_box *box, dest->y = box->y; break; case WL_OUTPUT_TRANSFORM_FLIPPED_90: - dest->x = box->y; - dest->y = box->x; + dest->x = box->height - box->y; + dest->y = box->width - box->x; break; case WL_OUTPUT_TRANSFORM_FLIPPED_180: dest->x = box->x; dest->y = box->height - box->y; break; case WL_OUTPUT_TRANSFORM_FLIPPED_270: - dest->x = box->height - box->y; - dest->y = box->width - box->x; + dest->x = box->y; + dest->y = box->x; break; } } |