From 7ad74d14160028fd709f595e9441c369cc4cd17e Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 10 Jan 2024 16:47:56 +0100 Subject: [PATCH] Set Pixmap depths after creating visuals This affects the ordering of visuals, which breaks some buggy applications that assume the first visual is the root window visual. --- unix/xserver/hw/vnc/xvnc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/xserver/hw/vnc/xvnc.c b/unix/xserver/hw/vnc/xvnc.c index c07f6899..16a28831 100644 --- a/unix/xserver/hw/vnc/xvnc.c +++ b/unix/xserver/hw/vnc/xvnc.c @@ -992,8 +992,6 @@ vncScreenInit(ScreenPtr pScreen, int argc, char **argv) vncFbptr[0] = pbits; vncFbstride[0] = vncScreenInfo.fb.paddedWidth; - miSetPixmapDepths(); - switch (vncScreenInfo.fb.depth) { case 16: miSetVisualTypesAndMasks(16, @@ -1018,6 +1016,8 @@ vncScreenInit(ScreenPtr pScreen, int argc, char **argv) return FALSE; } + miSetPixmapDepths(); + ret = fbScreenInit(pScreen, pbits, vncScreenInfo.fb.width, vncScreenInfo.fb.height, dpi, dpi, vncScreenInfo.fb.paddedWidth, -- 2.39.5