|
|
@ -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,
|
|
|
|
void wlr_output_transform_apply_to_box(enum wl_output_transform transform,
|
|
|
|
struct wlr_box *box, struct wlr_box *dest) {
|
|
|
|
struct wlr_box *box, struct wlr_box *dest) {
|
|
|
|
switch (transform) {
|
|
|
|
if (transform % 2 == 0) {
|
|
|
|
case WL_OUTPUT_TRANSFORM_NORMAL:
|
|
|
|
|
|
|
|
case WL_OUTPUT_TRANSFORM_180:
|
|
|
|
|
|
|
|
case WL_OUTPUT_TRANSFORM_FLIPPED:
|
|
|
|
|
|
|
|
case WL_OUTPUT_TRANSFORM_FLIPPED_180:
|
|
|
|
|
|
|
|
dest->width = box->width;
|
|
|
|
dest->width = box->width;
|
|
|
|
dest->height = box->height;
|
|
|
|
dest->height = box->height;
|
|
|
|
break;
|
|
|
|
} else {
|
|
|
|
case WL_OUTPUT_TRANSFORM_90:
|
|
|
|
|
|
|
|
case WL_OUTPUT_TRANSFORM_270:
|
|
|
|
|
|
|
|
case WL_OUTPUT_TRANSFORM_FLIPPED_90:
|
|
|
|
|
|
|
|
case WL_OUTPUT_TRANSFORM_FLIPPED_270:
|
|
|
|
|
|
|
|
dest->width = box->height;
|
|
|
|
dest->width = box->height;
|
|
|
|
dest->height = box->width;
|
|
|
|
dest->height = box->width;
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
switch (transform) {
|
|
|
|
switch (transform) {
|
|
|
@ -552,5 +543,6 @@ void wlr_output_transform_apply_to_box(enum wl_output_transform transform,
|
|
|
|
case WL_OUTPUT_TRANSFORM_FLIPPED_270:
|
|
|
|
case WL_OUTPUT_TRANSFORM_FLIPPED_270:
|
|
|
|
dest->x = box->height - box->y;
|
|
|
|
dest->x = box->height - box->y;
|
|
|
|
dest->y = box->width - box->x;
|
|
|
|
dest->y = box->width - box->x;
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|