Skip to content

Commit

Permalink
Set Pixmap depths after creating visuals
Browse files Browse the repository at this point in the history
This affects the ordering of visuals, which breaks some buggy
applications that assume the first visual is the root window visual.
  • Loading branch information
CendioOssman committed Jan 10, 2024
1 parent a9ac7ae commit 7ad74d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unix/xserver/hw/vnc/xvnc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

1 comment on commit 7ad74d1

@DocMAX
Copy link

@DocMAX DocMAX commented on 7ad74d1 Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing! thanks!

Please sign in to comment.