diff options
| -rw-r--r-- | FL/Fl_Screen_Driver.H | 3 | ||||
| -rw-r--r-- | FL/Fl_System_Driver.H | 3 | ||||
| -rw-r--r-- | src/Fl.cxx | 4 | ||||
| -rw-r--r-- | src/Fl_Screen_Driver.cxx | 9 | ||||
| -rw-r--r-- | src/Fl_System_Driver.cxx | 9 | ||||
| -rw-r--r-- | src/Fl_cocoa.mm | 4 | ||||
| -rw-r--r-- | src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H | 2 | ||||
| -rw-r--r-- | src/drivers/Darwin/Fl_Darwin_System_Driver.H | 2 |
8 files changed, 18 insertions, 18 deletions
diff --git a/FL/Fl_Screen_Driver.H b/FL/Fl_Screen_Driver.H index df917a066..00d3d763d 100644 --- a/FL/Fl_Screen_Driver.H +++ b/FL/Fl_Screen_Driver.H @@ -180,6 +180,9 @@ public: /* Number of pixels per drawing unit for the display. The default implementation may be enough. */ virtual float retina_factor() { return 1; } + // The default implementation of the next 2 functions may be enough. + virtual int run_also_windowless(); + virtual int wait_also_windowless(double delay); }; diff --git a/FL/Fl_System_Driver.H b/FL/Fl_System_Driver.H index a543906fd..ce4ba5129 100644 --- a/FL/Fl_System_Driver.H +++ b/FL/Fl_System_Driver.H @@ -225,9 +225,6 @@ public: virtual const char *meta_name() { return "Meta"; } virtual const char *alt_name() { return "Alt"; } virtual const char *control_name() { return "Ctrl"; } - // The default implementation of the next 2 functions may be enough. - virtual int run_also_windowless(); - virtual int wait_also_windowless(double delay); }; #endif // FL_SYSTEM_DRIVER_H diff --git a/src/Fl.cxx b/src/Fl.cxx index 0483c2e6a..d5d6fb8b7 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -594,7 +594,7 @@ int Fl::ready() \version 1.4.0 */ int Fl::run_also_windowless() { - return Fl::system_driver()->run_also_windowless(); + return Fl::screen_driver()->run_also_windowless(); } /** Wait for \p delay seconds or until an event occurs, even without any mapped window if the platform supports it. @@ -602,7 +602,7 @@ int Fl::run_also_windowless() { \version 1.4.0 */ int Fl::wait_also_windowless(double delay) { - return Fl::system_driver()->wait_also_windowless(delay); + return Fl::screen_driver()->wait_also_windowless(delay); } int Fl::program_should_quit_ = 0; diff --git a/src/Fl_Screen_Driver.cxx b/src/Fl_Screen_Driver.cxx index cd0bdbde3..b10aa13ac 100644 --- a/src/Fl_Screen_Driver.cxx +++ b/src/Fl_Screen_Driver.cxx @@ -520,6 +520,15 @@ int Fl_Screen_Driver::parse_color(const char* p, uchar& r, uchar& g, uchar& b) return 1; } +int Fl_Screen_Driver::run_also_windowless() { + return Fl::run(); +} + +int Fl_Screen_Driver::wait_also_windowless(double delay) { + Fl::wait(delay); + return Fl::first_window() != NULL; +} + // // End of "$Id$". // diff --git a/src/Fl_System_Driver.cxx b/src/Fl_System_Driver.cxx index 62c5a765b..c396c9e2f 100644 --- a/src/Fl_System_Driver.cxx +++ b/src/Fl_System_Driver.cxx @@ -445,15 +445,6 @@ void Fl_System_Driver::gettime(time_t *sec, int *usec) { *usec = 0; } -int Fl_System_Driver::run_also_windowless() { - return Fl::run(); -} - -int Fl_System_Driver::wait_also_windowless(double delay) { - Fl::wait(delay); - return Fl::first_window() != NULL; -} - // // End of "$Id$". // diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 5fbd2cbf2..20ac19641 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1719,14 +1719,14 @@ static void drain_dropped_files_list() { free(fname); } -int Fl_Darwin_System_Driver::run_also_windowless() { +int Fl_Cocoa_Screen_Driver::run_also_windowless() { while (!Fl::program_should_quit()) { Fl::wait(1e20); } return 0; } -int Fl_Darwin_System_Driver::wait_also_windowless(double delay) { +int Fl_Cocoa_Screen_Driver::wait_also_windowless(double delay) { if (!Fl::program_should_quit()) Fl::wait(delay); return !Fl::program_should_quit(); } diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H index 3fe29700c..12d93b9e8 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H +++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H @@ -100,6 +100,8 @@ public: virtual APP_SCALING_CAPABILITY rescalable() { return SYSTEMWIDE_APP_SCALING; } virtual float scale(int n) {return scale_;} virtual void scale(int n, float f) { scale_ = f;} + virtual int run_also_windowless(); + virtual int wait_also_windowless(double delay); private: float scale_; }; diff --git a/src/drivers/Darwin/Fl_Darwin_System_Driver.H b/src/drivers/Darwin/Fl_Darwin_System_Driver.H index 77f38efc0..c0e780532 100644 --- a/src/drivers/Darwin/Fl_Darwin_System_Driver.H +++ b/src/drivers/Darwin/Fl_Darwin_System_Driver.H @@ -81,8 +81,6 @@ public: virtual const char *meta_name(); virtual const char *alt_name(); virtual const char *control_name(); - virtual int run_also_windowless(); - virtual int wait_also_windowless(double delay); }; #endif // FL_DARWIN_SYSTEM_DRIVER_H |
