mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-27 01:10:06 +01:00
Xephyr: Handle depth 30 and reject higher depths rather than crashing.
This commit is contained in:
parent
f4a68f3701
commit
d500eeb945
1 changed files with 12 additions and 1 deletions
|
|
@ -150,11 +150,22 @@ ephyrScreenInitialize (KdScreenInfo *screen, EphyrScrPriv *scrpriv)
|
|||
screen->fb[0].depth = 16;
|
||||
screen->fb[0].bitsPerPixel = 16;
|
||||
}
|
||||
else
|
||||
else if (screen->fb[0].depth <= 24)
|
||||
{
|
||||
screen->fb[0].depth = 24;
|
||||
screen->fb[0].bitsPerPixel = 32;
|
||||
}
|
||||
else if (screen->fb[0].depth <= 30)
|
||||
{
|
||||
screen->fb[0].depth = 30;
|
||||
screen->fb[0].bitsPerPixel = 32;
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorF("\nXephyr: Unsupported screen depth %d\n",
|
||||
screen->fb[0].depth);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
hostx_get_visual_masks (screen, &redMask, &greenMask, &blueMask);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue