summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-04-11 13:04:53 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-04-11 13:04:53 +0200
commit3fa2b736984a21cba25d9615c802cfa45afb511c (patch)
tree765e01b0a7d188d9568ab4bead00c6c73b42efda /src
parent86ddfca2f3ffaa4bcfb628a8db8f037670cb0986 (diff)
Update comments of Fl_Cocoa_Window_Driver::make_current() for macOS 10.14
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index b953a6264..ecd3e0cc9 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -3346,18 +3346,21 @@ void Fl_Cocoa_Window_Driver::resize(int X, int Y, int W, int H) {
This can be called in 3 different instances:
1) When a window is created or resized.
- The system sends the drawRect: message to the window's view after having prepared the current
- graphics context to draw to this view. Processing of drawRect: sets variable through_drawRect
- to YES and calls Fl_Cocoa_Window_Driver::flush().
- Fl_Cocoa_Window_Driver::flush() sets through_Fl_X_flush
- to YES and calls Fl_Window::flush() that calls Fl_Window::make_current() that
+ Before 10.14: The system sends the drawRect: message to the window's view after having prepared the current
+ graphics context to draw to this view. Processing of drawRect: sets variable through_drawRect
+ to YES and calls Fl_Cocoa_Window_Driver::flush() that sets through_Fl_X_flush
+ to YES and calls Fl_Window::flush().
+ After 10.14: The system sends the displayLayer: message to the window's view.
+ Variable through_Fl_X_flush is set to YES and Fl_Window_Driver::flush() is called
+ which calls Fl_Window::flush().
+ Fl_Window::flush() calls Fl_Window::make_current() that
uses the window's graphics context. The window's draw() function is then executed.
2) At each round of the FLTK event loop.
Fl::flush() is called, that calls Fl_Cocoa_Window_Driver::flush() on each window that needs drawing.
- Variable through_Fl_X_flush is set to YES. Fl_Cocoa_Window_Driver::flush() locks the focus to the
- view and calls Fl_Window::flush() that calls Fl_Window::make_current() which uses the window's
- graphics context. Fl_Window::flush() then runs the window's draw() function.
+ Fl_Cocoa_Window_Driver::flush() [Before 10.14: locks the focus to the
+ view and] calls Fl_Window_Driver::flush() that calls Fl_Window::make_current()
+ and proceeds as in 1).
3) An FLTK application can call Fl_Window::make_current() at any time before it draws to a window.
This occurs for instance in the idle callback function of the mandelbrot test program. Variable