diff options
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H | 2 | ||||
| -rw-r--r-- | src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H index 970d78839..6f0f11d3f 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H +++ b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H @@ -100,6 +100,8 @@ public: void changed_resolution(bool);// sets whether window just moved to display with another resolution bool view_resized(); // did window's view receive [FLView view_did_resize] message? void view_resized(bool b); // sets whether window's view received [FLView view_did_resize] message + bool through_resize(); // did Fl_Window::resize() run already + void through_resize(bool b); // set whether Fl_Window::resize() run already CGRect* subRect() { return subRect_; } // getter void subRect(CGRect *r) { subRect_ = r; } // setter static void destroy(FLWindow*); diff --git a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx index 1b6205ceb..f9ba65683 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx +++ b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx @@ -262,6 +262,7 @@ int Fl_Cocoa_Window_Driver::scroll(int src_x, int src_y, int src_w, int src_h, i static const unsigned mapped_mask = 1; static const unsigned changed_mask = 2; static const unsigned view_resized_mask = 4; +static const unsigned through_resize_mask = 8; bool Fl_Cocoa_Window_Driver::mapped_to_retina() { return window_flags_ & mapped_mask; @@ -290,6 +291,15 @@ void Fl_Cocoa_Window_Driver::view_resized(bool b) { else window_flags_ &= ~view_resized_mask; } +bool Fl_Cocoa_Window_Driver::through_resize() { + return window_flags_ & through_resize_mask; +} + +void Fl_Cocoa_Window_Driver::through_resize(bool b) { + if (b) window_flags_ |= through_resize_mask; + else window_flags_ &= ~through_resize_mask; +} + // clip the graphics context to rounded corners void Fl_Cocoa_Window_Driver::clip_to_rounded_corners(CGContextRef gc, int w, int h) { |
