From 50b4a70def8edb9b7d88745d3f1c2b372268650a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 14 Jan 2022 18:16:01 +0100 Subject: [PATCH] xwayland/glx: Flip order of sRGB & non-sRGB fbconfigs The sRGB ones came before the non-sRGB ones, which broke some clients. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1225 Acked-by: Olivier Fourdan --- hw/xwayland/xwayland-glx.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/xwayland/xwayland-glx.c b/hw/xwayland/xwayland-glx.c index 3eb1f5979..a3e85fc2f 100644 --- a/hw/xwayland/xwayland-glx.c +++ b/hw/xwayland/xwayland-glx.c @@ -342,17 +342,18 @@ egl_mirror_configs(ScreenPtr pScreen, struct egl_screen *screen) for (i = nconfigs - 1; i > 0; i--) for (j = 0; j < 3; j++) /* direct_color */ for (k = 0; k < 2; k++) /* double_buffer */ { - c = translate_eglconfig(screen, host_configs[i], c, - /* direct_color */ j == 1, - /* double_buffer */ k > 0, - /* duplicate_for_composite */ j == 0, - /* srgb_only */ false); if (can_srgb) c = translate_eglconfig(screen, host_configs[i], c, /* direct_color */ j == 1, /* double_buffer */ k > 0, /* duplicate_for_composite */ j == 0, /* srgb_only */ true); + + c = translate_eglconfig(screen, host_configs[i], c, + /* direct_color */ j == 1, + /* double_buffer */ k > 0, + /* duplicate_for_composite */ j == 0, + /* srgb_only */ false); } screen->configs = host_configs;