From 6d24a355f0b07b94b87d498bea807a52281f3162 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 4 May 2020 11:15:34 +0200 Subject: [PATCH] Support case when captured window is fullscreen: no titlebar. --- src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx | 1 + 1 file changed, 1 insertion(+) 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());