summaryrefslogtreecommitdiff
path: root/src/twm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/twm.c')
-rw-r--r--src/twm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/twm.c b/src/twm.c
index 57f50ad..1c1e522 100644
--- a/src/twm.c
+++ b/src/twm.c
@@ -474,7 +474,11 @@ main(int argc, char *argv[])
if (DisplayCells(dpy, scrnum) < 3)
Scr->Monochrome = MONOCHROME;
+#if defined(__cplusplus) || defined(c_plusplus)
+ else if (DefaultVisual(dpy, scrnum)->c_class == GrayScale)
+#else
else if (DefaultVisual(dpy, scrnum)->class == GrayScale)
+#endif
Scr->Monochrome = GRAYSCALE;
else
Scr->Monochrome = COLOR;