diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-07-06 09:15:45 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-07-06 09:16:39 +0200 |
| commit | 71faa15432908e478398e7135d7b04225d1e9216 (patch) | |
| tree | ef9294547308a97a69022e881f2d1b79e4977c16 | |
| parent | a7c9fd88b3ddc9275be6fa5611ddf60da86b14c3 (diff) | |
Add support for macOS 10.15 "Catalina"
This is relatively to Catalina public beta for now.
| -rw-r--r-- | CHANGES.txt | 1 | ||||
| -rw-r--r-- | src/Fl_cocoa.mm | 3 | ||||
| -rw-r--r-- | src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 470f392ac..803cd9941 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -102,6 +102,7 @@ Changes in FLTK 1.4.0 Released: ??? ?? 2019 Other Improvements - (add new items here) + - Added support for macOS 10.15 "Catalina" - Improved documentation for '@' symbols in labels (STR #2940). - Fl_Roller can now be controlled via the mouse wheel (STR #3120). - Tooltips hide by themselves after 12 seconds (STR #2584). 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); |
