summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2015-09-23 15:35:58 +0200
committerAdam Jackson <ajax@redhat.com>2015-10-05 12:12:04 -0400
commite31fe8115ee080b58b2e96a5106f38e64944ce5e (patch)
treed44ff4085687b1486669e7e8e0e48c15ecef7d4e /hw
parentf6ce23fbfc8804204fa103f98b94478387b94040 (diff)
xwayland: Adjust screen size with rotation
bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92076 Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Tested-by: Artem Chudinov <arzeth0@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/xwayland/xwayland-output.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
index 1546eaa01..923f36804 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);