[PATCH xserver] xwayland: Fix backwards need_rotate logic

Jason Ekstrand jason at jlekstrand.net
Tue Feb 20 16:57:31 UTC 2018


When xdg_output support was added to Xwayland, need_rotate parameter was
added to output_get_new_size where true gave you the old pre-xdg_output
behavior and false gave the new behavior.  Unfortunately, the two places
where this is called, need_rotate was set backwards.  This caused input
get clampped to the wrong dimensions.

Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
Cc: Olivier Fourdan <ofourdan at redhat.com>
Cc: Daniel Stone <daniels at collabora.com>
---
 hw/xwayland/xwayland-output.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
index c593896..257c3ee 100644
--- a/hw/xwayland/xwayland-output.c
+++ b/hw/xwayland/xwayland-output.c
@@ -220,7 +220,7 @@ apply_output_change(struct xwl_output *xwl_output)
     xwl_output->xdg_output_done = FALSE;
 
     /* xdg-output sends output size in compositor space. so already rotated */
-    need_rotate = (xwl_output->xdg_output != NULL);
+    need_rotate = (xwl_output->xdg_output == NULL);
 
     randr_mode = xwayland_cvt(xwl_output->width, xwl_output->height,
                               xwl_output->refresh / 1000.0, 0, 0);
@@ -390,7 +390,7 @@ xwl_output_remove(struct xwl_output *xwl_output)
     struct xwl_output *it;
     struct xwl_screen *xwl_screen = xwl_output->xwl_screen;
     int width = 0, height = 0;
-    Bool need_rotate = (xwl_output->xdg_output != NULL);
+    Bool need_rotate = (xwl_output->xdg_output == NULL);
 
     RRCrtcDestroy(xwl_output->randr_crtc);
     RROutputDestroy(xwl_output->randr_output);
-- 
2.5.0.400.gff86faf



More information about the xorg-devel mailing list