summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_visual.cxx9
-rw-r--r--src/Fl_x.cxx8
2 files changed, 13 insertions, 4 deletions
diff --git a/src/Fl_visual.cxx b/src/Fl_visual.cxx
index 8b7768d23..2a37afe7c 100644
--- a/src/Fl_visual.cxx
+++ b/src/Fl_visual.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_visual.cxx,v 1.7 1999/01/07 19:17:32 mike Exp $"
+// "$Id: Fl_visual.cxx,v 1.7.2.1 2000/01/23 01:56:42 bill Exp $"
//
// Visual support for the Fast Light Tool Kit (FLTK).
//
@@ -46,6 +46,7 @@ int Fl::visual(int flags) {
static int test_visual(XVisualInfo& v, int flags) {
if (v.screen != fl_screen) return 0;
+#if USE_COLORMAP
if (!(flags & FL_INDEX)) {
if (v.c_class != StaticColor && v.c_class != TrueColor) return 0;
if (v.depth <= 8) return 0; // fltk will work better in colormap mode
@@ -55,6 +56,10 @@ static int test_visual(XVisualInfo& v, int flags) {
}
// for now, fltk does not like colormaps of more than 8 bits:
if ((v.c_class&1) && v.depth > 8) return 0;
+#else
+ // simpler if we can't use colormapped visuals at all:
+ if (v.c_class != StaticColor && v.c_class != TrueColor) return 0;
+#endif
#if USE_XDBE
if (flags & FL_DOUBLE) {
static XdbeScreenVisualInfo *xdbejunk;
@@ -102,5 +107,5 @@ int Fl::visual(int flags) {
#endif
//
-// End of "$Id: Fl_visual.cxx,v 1.7 1999/01/07 19:17:32 mike Exp $".
+// End of "$Id: Fl_visual.cxx,v 1.7.2.1 2000/01/23 01:56:42 bill Exp $".
//
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 44909be2e..966f6ca3e 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_x.cxx,v 1.24.2.9 2000/01/11 08:19:59 bill Exp $"
+// "$Id: Fl_x.cxx,v 1.24.2.10 2000/01/23 01:56:42 bill Exp $"
//
// X specific code for the Fast Light Tool Kit (FLTK).
//
@@ -271,6 +271,10 @@ void fl_open_display() {
templt.visualid = XVisualIDFromVisual(DefaultVisual(fl_display,fl_screen));
fl_visual = XGetVisualInfo(fl_display, VisualIDMask, &templt, &num);
fl_colormap = DefaultColormap(fl_display,fl_screen);
+
+#if !USE_COLORMAP
+ Fl::visual(FL_RGB);
+#endif
}
void fl_close_display() {
@@ -873,5 +877,5 @@ void Fl_Window::make_current() {
#endif
//
-// End of "$Id: Fl_x.cxx,v 1.24.2.9 2000/01/11 08:19:59 bill Exp $".
+// End of "$Id: Fl_x.cxx,v 1.24.2.10 2000/01/23 01:56:42 bill Exp $".
//