From: Jon Trulson Date: Mon, 30 Apr 2018 01:44:31 +0000 (-0600) Subject: dtfile/File.c: implement a hack to fix Ticket #19, tree icons are black X-Git-Tag: 2.2.4a~46 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c936a8c065f0f3bf0b4f323f2a7aa325acb1142f;p=oweals%2Fcde.git dtfile/File.c: implement a hack to fix Ticket #19, tree icons are black The real issue seems to be a bug in Motif. The background color for these tree icons is always black. Depending on what Palette you have selected, it's possible for the foreground color to be black. When this happens, you will see a black square since both fg and bg are now black. You can select another Palette that works (ie: foreground is white) and the problem goes away. So, for now, we always force a white foreground color so the actual symbols are visible in tree mode. --- diff --git a/cde/programs/dtfile/File.c b/cde/programs/dtfile/File.c index 12557a9e..228be51b 100644 --- a/cde/programs/dtfile/File.c +++ b/cde/programs/dtfile/File.c @@ -6131,6 +6131,19 @@ CreateTreeIcons(Widget w) XtSetArg (args[1], XmNforeground, &foreground_color); XtGetValues (w, args, 2); + /* JET - 4/29/18, It seems for some reason that no matter what + * background is specified for these pixmaps, it will always be + * black when drawn. This seems like a Motif issue. The problem + * arises when earlier on, depending on what Palette has been + * selected for the user, the foreground can also be black. In + * those cases, instead of seeing the pixmap, you see a black square + * since both the fg and bg colors are black now. We "fix" this by + * always forcing the foreground to be white. This is a + * "workaround" - the real problem still needs to be located and + * fixed. in motif. + */ + foreground_color = 0x00ffffff; + for (i = 0; i < 3; i++) { TreeBtnWd[i] = 5;