diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-08-02 13:49:17 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-08-02 13:49:17 +0000 |
| commit | 2fc4d518cc1c82293147989f338f4a62ec66113a (patch) | |
| tree | af31f4b3655060af0a4c4fd3c70129933dbaad1a /src/Fl_arg.cxx | |
| parent | afbeea5714673d1872bcf6949c0df714a3770478 (diff) | |
Fix Fl_Window::show(argc, argv) so that it calls Fl::get_system_colors(),
and Fl::get_system_colors() so that it doesn't override user/program colors
(STR #119)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3069 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_arg.cxx')
| -rw-r--r-- | src/Fl_arg.cxx | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/src/Fl_arg.cxx b/src/Fl_arg.cxx index 7347dfe2d..71c027600 100644 --- a/src/Fl_arg.cxx +++ b/src/Fl_arg.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_arg.cxx,v 1.5.2.8.2.15 2003/07/29 15:12:36 easysw Exp $" +// "$Id: Fl_arg.cxx,v 1.5.2.8.2.16 2003/08/02 13:49:17 easysw Exp $" // // Optional argument initialization code for the Fast Light Tool Kit (FLTK). // @@ -174,38 +174,34 @@ int Fl::args(int argc, char** argv, int& i, int (*cb)(int,char**,int&)) { return i; } - // show a main window, use any parsed arguments void Fl_Window::show(int argc, char **argv) { - if (!argc) {show(); return;} - if (!arg_called) { - Fl::args(argc,argv); + if (argc && !arg_called) Fl::args(argc,argv); + + Fl::get_system_colors(); #if !defined(WIN32) && !defined(__APPLE__) - // Get defaults for drag-n-drop and focus... - const char *key = 0, *val; + // Get defaults for drag-n-drop and focus... + const char *key = 0, *val; - fl_open_display(); + if (Fl::first_window()) key = Fl::first_window()->xclass(); + if (!key) key = "fltk"; - if (Fl::first_window()) key = Fl::first_window()->xclass(); - if (!key) key = "fltk"; + val = XGetDefault(fl_display, key, "dndTextOps"); + if (val) Fl::dnd_text_ops(strcasecmp(val, "true") == 0 || + strcasecmp(val, "on") == 0 || + strcasecmp(val, "yes") == 0); - val = XGetDefault(fl_display, key, "dndTextOps"); - if (val) Fl::dnd_text_ops(strcasecmp(val, "true") == 0 || + val = XGetDefault(fl_display, key, "tooltips"); + if (val) Fl_Tooltip::enable(strcasecmp(val, "true") == 0 || strcasecmp(val, "on") == 0 || strcasecmp(val, "yes") == 0); - val = XGetDefault(fl_display, key, "tooltips"); - if (val) Fl_Tooltip::enable(strcasecmp(val, "true") == 0 || - strcasecmp(val, "on") == 0 || - strcasecmp(val, "yes") == 0); - - val = XGetDefault(fl_display, key, "visibleFocus"); - if (val) Fl::visible_focus(strcasecmp(val, "true") == 0 || - strcasecmp(val, "on") == 0 || - strcasecmp(val, "yes") == 0); + val = XGetDefault(fl_display, key, "visibleFocus"); + if (val) Fl::visible_focus(strcasecmp(val, "true") == 0 || + strcasecmp(val, "on") == 0 || + strcasecmp(val, "yes") == 0); #endif // !WIN32 && !__APPLE__ - } // set colors first, so background_pixel is correct: static char beenhere; @@ -420,5 +416,5 @@ int XParseGeometry(const char* string, int* x, int* y, #endif // ifdef WIN32 // -// End of "$Id: Fl_arg.cxx,v 1.5.2.8.2.15 2003/07/29 15:12:36 easysw Exp $". +// End of "$Id: Fl_arg.cxx,v 1.5.2.8.2.16 2003/08/02 13:49:17 easysw Exp $". // |
