summaryrefslogtreecommitdiff
path: root/hw/xwayland
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2023-02-03 12:07:50 +0100
committerOlivier Fourdan <ofourdan@redhat.com>2023-02-13 14:41:05 +0100
commitddcbb46f9740425910cccdede374f41a3bee2dd7 (patch)
treec91e9bce4dbe6fae842e6825af05bc4f6e4821e1 /hw/xwayland
parent5aebc0109611fb78ea040e386273c15d604087f3 (diff)
xwayland: Tell RR has changed only when done
Since commit 204f10c2, we notify XRandR clients that the randr configuration has changes as soon as an new output is created. Yet, this might be premature, considering that at that point, we are still to receive the wl_output and xdg-output events that will most likely change the setup. So instead of calling RRTellChanged() from xwl_output_create(), wait until we get to call apply_output_change(), which occurs after the done events from both xdg-output and wl_output are received. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Diffstat (limited to 'hw/xwayland')
-rw-r--r--hw/xwayland/xwayland-output.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
index 7a9352f58..24c554b57 100644
--- a/hw/xwayland/xwayland-output.c
+++ b/hw/xwayland/xwayland-output.c
@@ -654,6 +654,8 @@ apply_output_change(struct xwl_output *xwl_output)
if (xwl_screen->fixed_output == NULL)
update_screen_size(xwl_screen, width, height);
+ else
+ RRTellChanged(xwl_screen->screen);
}
static void
@@ -814,7 +816,6 @@ xwl_output_create(struct xwl_screen *xwl_screen, uint32_t id, Bool with_xrandr)
RRCrtcGammaSetSize(xwl_output->randr_crtc, 256);
RROutputSetCrtcs(xwl_output->randr_output, &xwl_output->randr_crtc, 1);
RROutputSetConnection(xwl_output->randr_output, RR_Connected);
- RRTellChanged(xwl_screen->screen);
}
/* We want the output to be in the list as soon as created so we can
* use it when binding to the xdg-output protocol...