summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-07-06 09:15:45 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-07-06 09:16:39 +0200
commit71faa15432908e478398e7135d7b04225d1e9216 (patch)
treeef9294547308a97a69022e881f2d1b79e4977c16 /src
parenta7c9fd88b3ddc9275be6fa5611ddf60da86b14c3 (diff)
Add support for macOS 10.15 "Catalina"
This is relatively to Catalina public beta for now.
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm3
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 4662cb1ca..f745f12a7 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -3453,6 +3453,9 @@ Fl_Quartz_Copy_Surface_Driver::~Fl_Quartz_Copy_Surface_Driver()
{
CGContextRestoreGState(gc);
CGContextEndPage(gc);
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
+ if (fl_mac_os_version >= 100500) CGPDFContextClose(gc); // needs 10.5, necessary with macOS 10.15
+#endif
CGContextRelease(gc);
NSPasteboard *clip = [NSPasteboard generalPasteboard];
[clip declareTypes:[NSArray arrayWithObjects:PDF_pasteboard_type, TIFF_pasteboard_type, nil] owner:nil];
diff --git a/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx
index c3e313ef4..9c8e71671 100644
--- a/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx
@@ -101,7 +101,7 @@ void Fl_Quartz_Copy_Surface_Driver::untranslate() {
void Fl_Quartz_Copy_Surface_Driver::draw_decorated_window(Fl_Window *win, int x_offset, int y_offset) {
CALayer *layer = Fl_Cocoa_Window_Driver::driver(win)->get_titlebar_layer();
- if (!layer || fl_mac_os_version >= 101500) {
+ if (!layer) {
return Fl_Widget_Surface::draw_decorated_window(win, x_offset, y_offset);
}
CGContextSaveGState(gc);