summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-05-04 11:15:34 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-05-04 11:33:43 +0200
commit6d24a355f0b07b94b87d498bea807a52281f3162 (patch)
tree9f3239be0c30810bcd2d8416f7b55092a83d3a00 /src
parent70d41b06a96e421ce97558cdb2dae6d036479102 (diff)
Support case when captured window is fullscreen: no titlebar.
Diffstat (limited to 'src')
-rw-r--r--src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx1
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());