diff options
| -rw-r--r-- | FL/Fl.H | 3 | ||||
| -rw-r--r-- | src/Fl_lock.cxx | 8 | ||||
| -rw-r--r-- | src/Fl_win32.cxx | 5 |
3 files changed, 14 insertions, 2 deletions
@@ -303,11 +303,14 @@ public: static void (*idle)(); #ifndef FL_DOXYGEN +private: static Fl_Awake_Handler *awake_ring_; static void **awake_data_; static int awake_ring_size_; static int awake_ring_head_; static int awake_ring_tail_; +public: + static bool equal_awake_ring_ends(); static const char* scheme_; static Fl_Image* scheme_bg_; diff --git a/src/Fl_lock.cxx b/src/Fl_lock.cxx index fe527ba84..3aea98d95 100644 --- a/src/Fl_lock.cxx +++ b/src/Fl_lock.cxx @@ -198,3 +198,11 @@ int Fl::lock() { void Fl::unlock() { Fl::system_driver()->unlock(); } + +#ifndef FL_DOXYGEN + +bool Fl::equal_awake_ring_ends() { + return awake_ring_head_ == Fl::awake_ring_tail_; +} + +#endif // FL_DOXYGEN diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index f5a671f16..e613e359e 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -491,7 +491,8 @@ double Fl_WinAPI_System_Driver::wait(double time_to_wait) { DispatchMessageW(&fl_msg); } - // The following conditional test: + // The following conditional test: !Fl::equal_awake_ring_ends() + // equivalent to: // (Fl::awake_ring_head_ != Fl::awake_ring_tail_) // is a workaround / fix for STR #3143. This works, but a better solution // would be to understand why the PostThreadMessage() messages are not @@ -511,7 +512,7 @@ double Fl_WinAPI_System_Driver::wait(double time_to_wait) { // recover and process any pending awake callbacks. // Normally the ring buffer head and tail indices will match and this // comparison will do nothing. Addresses STR #3143 - if (Fl::awake_ring_head_ != Fl::awake_ring_tail_) { + if (!Fl::equal_awake_ring_ends()) { process_awake_handler_requests(); } |
