From a55363086d594e4df9573144b493da87b667fd27 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 7 Jan 2002 18:47:27 +0000 Subject: Don't apply tile image to menu or overlay windows. Add Fl_BMP_Image.H links to fltk.list.in. Reset colors to standard FLTK ones in Fl::get_system_colors(). Don't clear button events when fixing focus. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1918 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl.cxx | 8 +++++--- src/Fl_get_system_colors.cxx | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/Fl.cxx b/src/Fl.cxx index ccf13e541..6278ec4c5 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl.cxx,v 1.24.2.41.2.16 2002/01/01 15:11:29 easysw Exp $" +// "$Id: Fl.cxx,v 1.24.2.41.2.17 2002/01/07 18:47:27 easysw Exp $" // // Main event handling code for the Fast Light Tool Kit (FLTK). // @@ -447,7 +447,9 @@ void fl_fix_focus() { // set focus based on Fl::modal() and fl_xfocus Fl_Widget* w = fl_xfocus; if (w) { - Fl::e_keysym = 0; // make sure widgets don't think a keystroke moved focus + if (Fl::e_keysym < (FL_Button + FL_LEFT_MOUSE) || + Fl::e_keysym > (FL_Button + FL_RIGHT_MOUSE)) + Fl::e_keysym = 0; // make sure widgets don't think a keystroke moved focus while (w->parent()) w = w->parent(); if (Fl::modal()) w = Fl::modal(); if (!w->contains(Fl::focus())) @@ -851,5 +853,5 @@ void Fl_Window::flush() { } // -// End of "$Id: Fl.cxx,v 1.24.2.41.2.16 2002/01/01 15:11:29 easysw Exp $". +// End of "$Id: Fl.cxx,v 1.24.2.41.2.17 2002/01/07 18:47:27 easysw Exp $". // diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx index 8626e662b..5c0ce8329 100644 --- a/src/Fl_get_system_colors.cxx +++ b/src/Fl_get_system_colors.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.5 2002/01/01 15:11:31 easysw Exp $" +// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.6 2002/01/07 18:47:27 easysw Exp $" // // System color support for the Fast Light Tool Kit (FLTK). // @@ -62,9 +62,9 @@ void Fl::background2(uchar r, uchar g, uchar b) { } // these are set by Fl::args() and override any system colors: -const char *fl_fg; -const char *fl_bg; -const char *fl_bg2; +const char *fl_fg = NULL; +const char *fl_bg = NULL; +const char *fl_bg2 = NULL; static void set_selection_color(uchar r, uchar g, uchar b) { Fl::set_color(FL_SELECTION_COLOR,r,g,b); @@ -159,11 +159,11 @@ void Fl::get_system_colors() // the same color as the windows). static void -getsyscolor(const char *key1, const char* key2, const char *arg, void (*func)(uchar,uchar,uchar)) +getsyscolor(const char *key1, const char* key2, const char *arg, const char *defarg, void (*func)(uchar,uchar,uchar)) { if (!arg) { arg = XGetDefault (fl_display, key1, key2); - if (!arg) return; + if (!arg) arg = defarg; } XColor x; if (!XParseColor(fl_display, fl_colormap, arg, &x)) @@ -178,10 +178,10 @@ void Fl::get_system_colors() const char* key1 = 0; if (Fl::first_window()) key1 = Fl::first_window()->xclass(); if (!key1) key1 = "fltk"; - getsyscolor(key1, "background", fl_bg, Fl::background); - getsyscolor(key1, "foreground", fl_fg, Fl::foreground); - getsyscolor("Text","background", fl_bg2, Fl::background2); - getsyscolor(key1, "selectBackground",0, set_selection_color); + getsyscolor(key1, "background", fl_bg, "#c0c0c0", Fl::background); + getsyscolor(key1, "foreground", fl_fg, "#000000", Fl::foreground); + getsyscolor("Text","background", fl_bg2, "#ffffff", Fl::background2); + getsyscolor(key1, "selectBackground",0, "#000080", set_selection_color); } #endif @@ -304,5 +304,5 @@ int Fl::reload_scheme() { // -// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.5 2002/01/01 15:11:31 easysw Exp $". +// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.6 2002/01/07 18:47:27 easysw Exp $". // -- cgit v1.2.3