]> source.dussan.org Git - tigervnc.git/commitdiff
Set Pixmap depths after creating visuals
authorPierre Ossman <ossman@cendio.se>
Wed, 10 Jan 2024 15:47:56 +0000 (16:47 +0100)
committerPierre Ossman <ossman@cendio.se>
Wed, 10 Jan 2024 15:47:56 +0000 (16:47 +0100)
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

index c07f6899fded54d03a9af786cfa1fe620b783b81..16a28831690ce117804e19cb0d7d1c0d444d7b91 100644 (file)
@@ -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,