URI: 
       tdevdraw: prefer 24-bit over 15-bit or 16-bit. - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 60a47420a8887d7fcda37efe4b6baf730d9cc936
   DIR parent 5b6028903dc9a0d1561a54764a520aaa1b1100e4
  HTML Author: Russ Cox <rsc@swtch.com>
       Date:   Sun,  7 Oct 2012 09:48:47 -0400
       
       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
       
       Diffstat:
         M src/cmd/devdraw/x11-init.c          |      12 ++++++------
       
       1 file changed, 6 insertions(+), 6 deletions(-)
       ---
   DIR diff --git a/src/cmd/devdraw/x11-init.c b/src/cmd/devdraw/x11-init.c
       t@@ -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;
       t@@ -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){