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>
This commit is contained in:
parent
32dad24083
commit
8c54f90673
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue