dticon: fixed "rubber string" drawing on high/true color displays
authoralx <alx@fastestcode.org>
Mon, 24 Jun 2013 20:29:19 +0000 (22:29 +0200)
committerJon Trulson <jon@radscan.com>
Wed, 26 Jun 2013 17:20:52 +0000 (11:20 -0600)
cde/programs/dticon/utils.c

index 307aa0c231f3f074386999af5a84e63ee9da7da5..dc4e2fa0c4dbe89f646530288d32ded6ff1f0c6b 100644 (file)
@@ -377,7 +377,8 @@ Init_Editor(
   Erase_gc = XCreateGC(dpy, root, 0, 0);
   Flicker_gc = XCreateGC(dpy, root, 0, 0);
   scratch_gc = XCreateGC(dpy, root, 0, 0);
-  XSetState(dpy, Flicker_gc, black_pixel, white_pixel, GXinvert, 0x1);
+  XSetState(dpy, Flicker_gc, black_pixel, white_pixel, GXinvert,
+       (DefaultDepthOfScreen(XtScreen(wid)) > 8) ? AllPlanes : 0x01);
   XSetSubwindowMode(dpy, Flicker_gc, IncludeInferiors);
   XSetDashes(dpy, Grid_gc, 0, dash_list, 2);
   XSetLineAttributes(dpy, Grid_gc, 0, LineDoubleDash, CapButt, JoinMiter);