Package: flwm Version: 1.00-7 Followup-For: Bug #267983
This is an accessibility bug because it can make flwm unreadable for people like me (my visual disability means I need bright text on a dark background, not the other way around). The colours used to work OK in Debian Woody. I did "apt-get source flwm" and had a look. In Menu.C, there are 2 references to FL_BLACK (hard-coded black colour). I replaced both instances of FL_BLACK with Fl::get_color(FL_FOREGROUND_COLOR) and then I compiled it by doing "aptitude install libfltk1.1-dev" (to install the necessary libraries) and "./configure" and "make". The result was that most of the menus display correctly, but not "new desktop", "logout" or the title bars. I fixed the title bars by editing Frame.C and replacing both fl_color(labelcolor()); (line 1153) and fl_color(parent()->labelcolor()); (line 1172) with fl_color(Fl::get_color(FL_FOREGROUND_COLOR)); For the remaining 2 menu items, I edited Menu.C and replaced line 624, while (menu[n].label()) menu[n++].labeltype(TEXT_LABEL); with this: while (menu[n].label()) { menu[n].labelcolor(Fl::get_color(FL_FOREGROUND_COLOR)); menu[n++].labeltype(TEXT_LABEL); } That causes the colour to be set for these items (otherwise it is left at zero which is black). There remains the dialogue boxes for "new desktop name" and "logout". I added code to set the colours properly in these as well. Here is a patch with all the changes I made: diff -u flwm-1.00/Frame.C flwm-1.00-new/Frame.C --- flwm-1.00/Frame.C 2000-09-22 17:53:05.000000000 +0100 +++ flwm-1.00-new/Frame.C 2005-07-02 08:11:54.000000000 +0100 @@ -1150,7 +1150,7 @@ XClearArea(fl_display, fl_xid(this), 1, label_y+3, left-1, label_h-3, 0); #endif - fl_color(labelcolor()); + fl_color(Fl::get_color(FL_FOREGROUND_COLOR)); fl_font(TITLE_FONT_SLOT, TITLE_FONT_SIZE); draw_rotated90(label(), 1, label_y+3, left-1, label_h-3, Fl_Align(FL_ALIGN_TOP|FL_ALIGN_CLIP)); @@ -1169,7 +1169,7 @@ void FrameButton::draw() { Fl_Widget::draw_box(value() ? FL_DOWN_FRAME : FL_UP_FRAME, FL_GRAY); - fl_color(parent()->labelcolor()); + fl_color(Fl::get_color(FL_FOREGROUND_COLOR)); switch (label()[0]) { case 'W': #if MINIMIZE_ARROW Only in flwm-1.00-new: makeinclude diff -u flwm-1.00/Menu.C flwm-1.00-new/Menu.C --- flwm-1.00/Menu.C 2005-07-02 08:48:47.000000000 +0100 +++ flwm-1.00-new/Menu.C 2005-07-02 08:47:29.000000000 +0100 @@ -81,7 +81,7 @@ if (h < 3) h = 3; if (y+h > SCREEN_H) y = SCREEN_H-h; if (y < 0) y = 0; - fl_color(FL_BLACK); + fl_color(Fl::get_color(FL_FOREGROUND_COLOR)); if (c->state() == ICONIC) fl_rect(X+x+SCREEN_DX, Y+y+SCREEN_DX, w, h); else @@ -171,11 +171,17 @@ FrameWindow* w = new FrameWindow(190,90); new_desktop_input = new Fl_Input(10,30,170,25,"New desktop name:"); new_desktop_input->align(FL_ALIGN_TOP_LEFT); + new_desktop_input->textcolor(Fl::get_color(FL_FOREGROUND_COLOR)); + new_desktop_input->cursor_color(Fl::get_color(FL_FOREGROUND_COLOR)); + new_desktop_input->color((Fl::get_color(FL_FOREGROUND_COLOR)==FL_BLACK) ? FL_WHITE : FL_BLACK); // the background of the input box (NB don't set it to FL_BACKGROUND_COLOR because that's also the selection colour) new_desktop_input->labelfont(FL_BOLD); + new_desktop_input->labelcolor(Fl::get_color(FL_FOREGROUND_COLOR)); Fl_Return_Button* b = new Fl_Return_Button(100,60,80,20,"OK"); b->callback(new_desktop_ok_cb); + b->labelcolor(Fl::get_color(FL_FOREGROUND_COLOR)); Fl_Button* b2 = new Fl_Button(10,60,80,20,"Cancel"); b2->callback(cancel_cb); + b2->labelcolor(Fl::get_color(FL_FOREGROUND_COLOR)); w->set_non_modal(); w->end(); } @@ -216,11 +222,11 @@ if (!w) { w = new FrameWindow(190,90); Fl_Box* l = new Fl_Box(0, 0, 190, 60, "Really log out?"); - l->labelfont(FL_BOLD); + l->labelfont(FL_BOLD); l->labelcolor(Fl::get_color(FL_FOREGROUND_COLOR)); Fl_Return_Button* b = new Fl_Return_Button(100,60,80,20,"OK"); - b->callback(exit_cb); + b->callback(exit_cb); b->labelcolor(Fl::get_color(FL_FOREGROUND_COLOR)); Fl_Button* b2 = new Fl_Button(10,60,80,20,"Cancel"); - b2->callback(cancel_cb); + b2->callback(cancel_cb); b2->labelcolor(Fl::get_color(FL_FOREGROUND_COLOR)); w->set_non_modal(); w->end(); } @@ -283,7 +289,7 @@ m.shortcut(0); m.labelfont(MENU_FONT_SLOT); m.labelsize(MENU_FONT_SIZE); - m.labelcolor(FL_BLACK); + m.labelcolor(Fl::get_color(FL_FOREGROUND_COLOR)); } #if WMX_MENU_ITEMS @@ -621,7 +627,7 @@ if (one_desktop) #endif // fix the menus items so they are indented to align with window names: - while (menu[n].label()) menu[n++].labeltype(TEXT_LABEL); + while (menu[n].label()) { menu[n].labelcolor(Fl::get_color(FL_FOREGROUND_COLOR)); menu[n++].labeltype(TEXT_LABEL); } const Fl_Menu_Item* picked = menu->popup(Fl::event_x(), Fl::event_y(), 0, preset); -- System Information: Debian Release: 3.1 Architecture: i386 (i686) Kernel: Linux 2.4.23 Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1) (ignored: LC_ALL set to en_GB) Versions of packages flwm depends on: ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an ii libfltk1.1c102 1.1.6-5 Fast Light Toolkit shared librarie ii libgcc1 1:3.4.3-13 GCC support library ii libstdc++5 1:3.3.5-13 The GNU Standard C++ Library v3 ii libx11-6 4.3.0.dfsg.1-14 X Window System protocol client li ii libxext6 4.3.0.dfsg.1-14 X Window System miscellaneous exte ii xlibs 4.3.0.dfsg.1-14 X Keyboard Extension (XKB) configu -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]