summaryrefslogtreecommitdiff
path: root/test/unittests.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2015-02-09 18:04:31 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2015-02-09 18:04:31 +0000
commit965be94165f1b8e4b92d7d34a8f8bcc5cd146c3b (patch)
tree19b89c081ffb62ba204d56f1a8172d8e74cac494 /test/unittests.cxx
parent522fc17d31171650b53d9c676bdc67dd1a4b70ee (diff)
Make demo programs display the correct Fl::scheme() in all cases.
Demo programs using Fl::args() and fl_get_system_colors() instead of Fl_Window::show(argc,argv) didn't correctly initialize the Fl::scheme() if the environment variable FLTK_SCHEME was set. Calling Fl::scheme(Fl::scheme()) fixes this, because (currently) only Fl::scheme(NULL) reads the environment variable FLTK_SCHEME. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10565 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test/unittests.cxx')
-rw-r--r--test/unittests.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/unittests.cxx b/test/unittests.cxx
index d07cd8edf..a5c614918 100644
--- a/test/unittests.cxx
+++ b/test/unittests.cxx
@@ -171,6 +171,8 @@ void Browser_CB(Fl_Widget*, void*) {
// registered tests to the browser widget.
int main(int argc, char **argv) {
Fl::args(argc,argv);
+ Fl::get_system_colors();
+ Fl::scheme(Fl::scheme()); // init scheme before instantiating tests
Fl::visual(FL_RGB);
mainwin = new MainWindow(MAINWIN_W, MAINWIN_H, "Fltk Unit Tests");
browser = new Fl_Hold_Browser(BROWSER_X, BROWSER_Y, BROWSER_W, BROWSER_H, "Unit Tests");