diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2023-11-27 13:34:52 +0100 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2024-03-20 09:05:36 +0100 |
commit | 8c54f90673370b75b75207aaf7f5752a9cd123f9 (patch) | |
tree | 097f7c1ddd68d3161d11e2ccf1aae10e67ee0fa5 | |
parent | 32dad240832af1e2e1abb5f150cb35c8e1494656 (diff) |
xwayland: Store the mode width/height
The mode size can be different from the actual output size when a
transformation is at play.
Store the actual mode width/height as well in preparation for adding
support for transforms.
No functional change.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-By: Kenny Levinsen <kl@kl.wtf>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1197>
-rw-r--r-- | hw/xwayland/xwayland-output.c | 6 | ||||
-rw-r--r-- | hw/xwayland/xwayland-output.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c index e947ca090..349af302b 100644 --- a/hw/xwayland/xwayland-output.c +++ b/hw/xwayland/xwayland-output.c @@ -1155,6 +1155,9 @@ xwl_randr_add_modes_fixed(struct xwl_output *xwl_output, return FALSE; } + xwl_output->mode_width = current_width; + xwl_output->mode_height = current_height; + nmodes = 0; current = 0; @@ -1192,6 +1195,9 @@ xwl_output_set_mode_fixed(struct xwl_output *xwl_output, RRModePtr mode) { struct xwl_screen *xwl_screen = xwl_output->xwl_screen; + xwl_output->mode_width = mode->mode.width; + xwl_output->mode_height = mode->mode.height; + update_screen_size(xwl_screen, mode->mode.width, mode->mode.height); RRCrtcNotify(xwl_output->randr_crtc, mode, 0, 0, RR_Rotate_0, diff --git a/hw/xwayland/xwayland-output.h b/hw/xwayland/xwayland-output.h index 24b118dfd..68889c59d 100644 --- a/hw/xwayland/xwayland-output.h +++ b/hw/xwayland/xwayland-output.h @@ -54,6 +54,7 @@ struct xwl_output { struct zxdg_output_v1 *xdg_output; uint32_t server_output_id; int32_t x, y, width, height, refresh; + int32_t mode_width, mode_height; Rotation rotation; Bool wl_output_done; Bool xdg_output_done; |