From abc12cd376a615af7182b81a435fa2ccb63e4e5d Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 23 Mar 2016 20:42:13 +0000 Subject: 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 --- src/drivers/X11/Fl_X11_Window_Driver.cxx | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'src/drivers/X11/Fl_X11_Window_Driver.cxx') diff --git a/src/drivers/X11/Fl_X11_Window_Driver.cxx b/src/drivers/X11/Fl_X11_Window_Driver.cxx index 7ae170284..dbfee0371 100644 --- a/src/drivers/X11/Fl_X11_Window_Driver.cxx +++ b/src/drivers/X11/Fl_X11_Window_Driver.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -517,6 +518,42 @@ void Fl_X11_Window_Driver::decoration_sizes(int *top, int *left, int *right, in *bottom = 8; } +void Fl_X11_Window_Driver::show_with_args_begin() { + // 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); +} + + +void Fl_X11_Window_Driver::show_with_args_end(int argc, char **argv) { + // set the command string, used by state-saving window managers: + int j; + int n=0; for (j=0; j