From da791ed9fdc715dcbe73c60a4c4ab2d385ab28e4 Mon Sep 17 00:00:00 2001 From: Roman Gilg Date: Thu, 13 Aug 2020 16:55:03 +0200 Subject: [PATCH] Revert "xserver: Fix a typo" This reverts commit 427f8bc00981703abe3153b6da575faa69fe2748. When receiving an output update for the mode size we need to rotate the stored width and height values if and only if we have an xdg-output for this output since in this case the stored values describe the output's size in logical space, i.e. rotated. The here reverted commit made a code change with which we would not rotate though when an xdg-output was available since in this case the need_rotate variable was set to False what caused in the check afterwards the first branch to execute. --- hw/xwayland/xwayland-output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c index 6df835de6..05e6ddcfc 100644 --- a/hw/xwayland/xwayland-output.c +++ b/hw/xwayland/xwayland-output.c @@ -513,7 +513,7 @@ apply_output_change(struct xwl_output *xwl_output) need_rotate = (xwl_output->xdg_output == NULL); /* We need to rotate back the logical size for the mode */ - if (!need_rotate || xwl_output->rotation & (RR_Rotate_0 | RR_Rotate_180)) { + if (need_rotate || xwl_output->rotation & (RR_Rotate_0 | RR_Rotate_180)) { mode_width = xwl_output->width; mode_height = xwl_output->height; } else {