devdraw: prefer 24-bit over 15-bit or 16-bit.
Fixes remote X11 use via XQuartz 2.7.4. R=rsc http://codereview.appspot.com/6624058
This commit is contained in:
parent
5b6028903d
commit
60a47420a8
1 changed files with 6 additions and 6 deletions
|
|
@ -98,6 +98,12 @@ _xattach(char *label, char *winsize)
|
|||
/*
|
||||
* Figure out underlying screen format.
|
||||
*/
|
||||
if(XMatchVisualInfo(_x.display, xrootid, 24, TrueColor, &xvi)
|
||||
|| XMatchVisualInfo(_x.display, xrootid, 24, DirectColor, &xvi)){
|
||||
_x.vis = xvi.visual;
|
||||
_x.depth = 24;
|
||||
}
|
||||
else
|
||||
if(XMatchVisualInfo(_x.display, xrootid, 16, TrueColor, &xvi)
|
||||
|| XMatchVisualInfo(_x.display, xrootid, 16, DirectColor, &xvi)){
|
||||
_x.vis = xvi.visual;
|
||||
|
|
@ -110,12 +116,6 @@ _xattach(char *label, char *winsize)
|
|||
_x.depth = 15;
|
||||
}
|
||||
else
|
||||
if(XMatchVisualInfo(_x.display, xrootid, 24, TrueColor, &xvi)
|
||||
|| XMatchVisualInfo(_x.display, xrootid, 24, DirectColor, &xvi)){
|
||||
_x.vis = xvi.visual;
|
||||
_x.depth = 24;
|
||||
}
|
||||
else
|
||||
if(XMatchVisualInfo(_x.display, xrootid, 8, PseudoColor, &xvi)
|
||||
|| XMatchVisualInfo(_x.display, xrootid, 8, StaticColor, &xvi)){
|
||||
if(_x.depth > 8){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue