diff options
| author | Manolo Gouy <Manolo> | 2016-03-23 20:42:13 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-03-23 20:42:13 +0000 |
| commit | abc12cd376a615af7182b81a435fa2ccb63e4e5d (patch) | |
| tree | 58f898451ade103a102e0b7a712e1a1f85490b24 /src/Fl_arg.cxx | |
| parent | d3b33cdaeaa17d5ee1f7208d467fd2edbb617c16 (diff) | |
Rewrite Fl_Window::show(int argc, char **argv) under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11413 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_arg.cxx')
| -rw-r--r-- | src/Fl_arg.cxx | 45 |
1 files changed, 3 insertions, 42 deletions
diff --git a/src/Fl_arg.cxx b/src/Fl_arg.cxx index 34ba95bb1..8f92e3fed 100644 --- a/src/Fl_arg.cxx +++ b/src/Fl_arg.cxx @@ -20,8 +20,8 @@ // You do not need to call this! Feel free to make up your own switches. #include <FL/Fl.H> -#include <FL/x.H> #include <FL/Fl_Window.H> +#include <FL/Fl_Window_Driver.H> #include <FL/Fl_Tooltip.H> #include <FL/filename.H> #include <FL/fl_draw.H> @@ -301,32 +301,7 @@ void Fl_Window::show(int argc, char **argv) { Fl::get_system_colors(); -#if defined(WIN32) -#elif defined(__APPLE__) // PORTME: Fl_Screen_Driver- platform default parameters -#elif defined(FL_PORTING) -# pragma message "FL_PORTING: Parse additional default settings" -#else // X11 - // Get defaults for drag-n-drop and focus... - const char *key = 0, *val; - - 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, "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); -#endif // !WIN32 && !__APPLE__ // PORTME: platform defaults + pWindowDriver->show_with_args_begin(); // set colors first, so background_pixel is correct: static char beenhere; @@ -365,21 +340,7 @@ void Fl_Window::show(int argc, char **argv) { // Show the window AFTER we have set the colors and scheme. show(); -#if defined(WIN32) -#elif defined(__APPLE__) // PORTME: Fl_System_Driver - platform properties -#elif defined(FL_PORTING) -# pragma message "FL_PORTING: Parse additional default settings" -#else // X11 - // set the command string, used by state-saving window managers: - int j; - int n=0; for (j=0; j<argc; j++) n += strlen(argv[j])+1; - char *buffer = new char[n]; - char *p = buffer; - for (j=0; j<argc; j++) for (const char *q = argv[j]; (*p++ = *q++);); - XChangeProperty(fl_display, fl_xid(this), XA_WM_COMMAND, XA_STRING, 8, 0, - (unsigned char *)buffer, p-buffer-1); - delete[] buffer; -#endif // !WIN32 && !__APPLE__ // PORTME: Fl_System_Driver - platform properties + pWindowDriver->show_with_args_end(argc, argv); } // Calls useful for simple demo programs, with automatic help message: |
