mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 06:35:58 +01:00
Fix inverted flipped-90 and flipped-270
This commit is contained in:
parent
6a69b4419f
commit
4a56957a37
2 changed files with 8 additions and 8 deletions
|
@ -105,16 +105,16 @@ static const float transforms[][4] = {
|
||||||
0.0f, 1.0f,
|
0.0f, 1.0f,
|
||||||
},
|
},
|
||||||
[WL_OUTPUT_TRANSFORM_FLIPPED_90] = {
|
[WL_OUTPUT_TRANSFORM_FLIPPED_90] = {
|
||||||
0.0f, 1.0f,
|
0.0f, -1.0f,
|
||||||
1.0f, 0.0f,
|
-1.0f, 0.0f,
|
||||||
},
|
},
|
||||||
[WL_OUTPUT_TRANSFORM_FLIPPED_180] = {
|
[WL_OUTPUT_TRANSFORM_FLIPPED_180] = {
|
||||||
1.0f, 0.0f,
|
1.0f, 0.0f,
|
||||||
0.0f, -1.0f,
|
0.0f, -1.0f,
|
||||||
},
|
},
|
||||||
[WL_OUTPUT_TRANSFORM_FLIPPED_270] = {
|
[WL_OUTPUT_TRANSFORM_FLIPPED_270] = {
|
||||||
0.0f, -1.0f,
|
0.0f, 1.0f,
|
||||||
-1.0f, 0.0f,
|
1.0f, 0.0f,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -99,16 +99,16 @@ void wlr_box_transform(struct wlr_box *box,
|
||||||
dest->y = box->y;
|
dest->y = box->y;
|
||||||
break;
|
break;
|
||||||
case WL_OUTPUT_TRANSFORM_FLIPPED_90:
|
case WL_OUTPUT_TRANSFORM_FLIPPED_90:
|
||||||
dest->x = box->y;
|
dest->x = box->height - box->y;
|
||||||
dest->y = box->x;
|
dest->y = box->width - box->x;
|
||||||
break;
|
break;
|
||||||
case WL_OUTPUT_TRANSFORM_FLIPPED_180:
|
case WL_OUTPUT_TRANSFORM_FLIPPED_180:
|
||||||
dest->x = box->x;
|
dest->x = box->x;
|
||||||
dest->y = box->height - box->y;
|
dest->y = box->height - box->y;
|
||||||
break;
|
break;
|
||||||
case WL_OUTPUT_TRANSFORM_FLIPPED_270:
|
case WL_OUTPUT_TRANSFORM_FLIPPED_270:
|
||||||
dest->x = box->height - box->y;
|
dest->x = box->y;
|
||||||
dest->y = box->width - box->x;
|
dest->y = box->x;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue