summaryrefslogtreecommitdiff
path: root/src/Fl_visual.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1998-12-06 14:44:00 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1998-12-06 14:44:00 +0000
commitd4b8c831c12156a610f0981e57b61c33399903f2 (patch)
tree22312eaeadaa5d3ab667d2d467e7e7f9c4db2933 /src/Fl_visual.cxx
parent5fea9312add860d875fb0b43e22a90daf83dfc69 (diff)
Updated visual checking code to ignore DirectColor visuals.
git-svn-id: file:///fltk/svn/fltk/trunk@126 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_visual.cxx')
-rw-r--r--src/Fl_visual.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Fl_visual.cxx b/src/Fl_visual.cxx
index 664686c96..fe57664c5 100644
--- a/src/Fl_visual.cxx
+++ b/src/Fl_visual.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_visual.cxx,v 1.5 1998/10/21 14:20:35 mike Exp $"
+// "$Id: Fl_visual.cxx,v 1.6 1998/12/06 14:44:00 mike Exp $"
//
// Visual support for the Fast Light Tool Kit (FLTK).
//
@@ -47,14 +47,14 @@ int Fl::visual(int flags) {
static int test_visual(XVisualInfo& v, int flags) {
if (v.screen != fl_screen) return 0;
if (!(flags & FL_INDEX)) {
- if (!v.red_mask) return 0; // detects static, true, and direct color
+ if (v.c_class != StaticColor && v.c_class != TrueColor) return 0;
if (v.depth <= 8) return 0; // fltk will work better in colormap mode
}
if (flags & FL_RGB8) {
if (v.depth < 24) return 0;
}
// for now, fltk does not like colormaps of more than 8 bits:
- if (!v.red_mask && v.depth > 8) return 0;
+ if ((v.c_class&1) && v.depth > 8) return 0;
#if USE_XDBE
if (flags & FL_DOUBLE) {
static XdbeScreenVisualInfo *xdbejunk;
@@ -102,5 +102,5 @@ int Fl::visual(int flags) {
#endif
//
-// End of "$Id: Fl_visual.cxx,v 1.5 1998/10/21 14:20:35 mike Exp $".
+// End of "$Id: Fl_visual.cxx,v 1.6 1998/12/06 14:44:00 mike Exp $".
//