diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-05-04 11:15:34 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-05-04 11:33:43 +0200 |
| commit | 6d24a355f0b07b94b87d498bea807a52281f3162 (patch) | |
| tree | 9f3239be0c30810bcd2d8416f7b55092a83d3a00 | |
| parent | 70d41b06a96e421ce97558cdb2dae6d036479102 (diff) | |
Support case when captured window is fullscreen: no titlebar.
| -rw-r--r-- | src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx index ea26c4d47..f77fc9e04 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx +++ b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx @@ -317,6 +317,7 @@ void Fl_Cocoa_Window_Driver::capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl left = bottom = right = NULL; int htop, hleft, hright, hbottom; Fl_Cocoa_Window_Driver::decoration_sizes(&htop, &hleft, &hright, &hbottom); + if (htop == 0) return; // when window is fullscreen CALayer *layer = get_titlebar_layer(); CGColorSpaceRef cspace = CGColorSpaceCreateDeviceRGB(); float s = Fl::screen_driver()->scale(screen_num()); |
