summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-04-21 09:45:43 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-04-21 09:45:43 +0200
commitb3d46711be253862ee73d8ed88e00eef129abbf8 (patch)
treede46d93d2370575330103bd2ae95ecfaff83db82 /src
parente3ad0ee441147a28798e477bc44e30aa057a3b1a (diff)
Slightly improve drawing of window titlebars.
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 7ae551263..aded8cb4e 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -4377,8 +4377,10 @@ void Fl_Cocoa_Window_Driver::draw_layer_to_context(CALayer *layer, CGContextRef
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
CGContextSaveGState(gc);
clip_to_rounded_corners(gc, w, h);
- CGContextSetRGBFillColor(gc, .79, .79, .79, 1.); // equiv. to FL_DARK1
- CGContextFillRect(gc, CGRectMake(0, 0, w, h));
+ if (fl_mac_os_version < 101500) { // exact OS threshold might be lower
+ CGContextSetRGBFillColor(gc, .79, .79, .79, 1.); // equiv. to FL_DARK1
+ CGContextFillRect(gc, CGRectMake(0, 0, w, h));
+ }
CGContextSetShouldAntialias(gc, true);
[layer renderInContext:gc]; // 10.5
CGContextRestoreGState(gc);