[PATCH] xwayland: Adjust screen size with rotation
Dave Airlie
airlied at gmail.com
Fri Oct 2 16:46:34 PDT 2015
On 23 September 2015 at 23:35, Olivier Fourdan <ofourdan at redhat.com> wrote:
> bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92076
> Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
Seems sane,
Reviewed-by: Dave Airlie <airlied at redhat.com>
> ---
> hw/xwayland/xwayland-output.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
> index 7e5484c..7d7420b 100644
> --- a/hw/xwayland/xwayland-output.c
> +++ b/hw/xwayland/xwayland-output.c
> @@ -101,8 +101,13 @@ output_handle_mode(void *data, struct wl_output *wl_output, uint32_t flags,
> if (!(flags & WL_OUTPUT_MODE_CURRENT))
> return;
>
> - xwl_output->width = width;
> - xwl_output->height = height;
> + if (xwl_output->rotation & (RR_Rotate_0 | RR_Rotate_180)) {
> + xwl_output->width = width;
> + xwl_output->height = height;
> + } else {
> + xwl_output->width = height;
> + xwl_output->height = width;
> + }
>
> randr_mode = xwayland_cvt(width, height, refresh / 1000.0, 0, 0);
>
> --
> 2.4.3
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list