summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 3fe050188..e0b787c10 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -1251,13 +1251,15 @@ static FLWindowDelegate *flwindowdelegate_instance = nil;
if (fl_mac_os_version < 101000) [nsw recursivelySendToSubwindows:@selector(setSubwindowFrame)];
[nsw checkSubwindowFrame];
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
- if (views_use_CA && [(FLView*)[nsw contentView] did_view_resolution_change]) {
+ FLView *view = (FLView*)[nsw contentView];
+ if (views_use_CA && [view did_view_resolution_change]) {
if (!window->as_gl_window()) { // move layered non-GL window to different resolution
- [(FLView*)[nsw contentView] viewFrameDidChange];
+ [view viewFrameDidChange];
+ [view displayLayer:[view layer]]; // useful for Mandelbrot to recreate the layer's bitmap
}
if (fl_mac_os_version < 101401 && window->parent() && window->as_gl_window() && Fl::use_high_res_GL()) {
Fl_Cocoa_Window_Driver *d = Fl_Cocoa_Window_Driver::driver(window);
- [[nsw contentView] layer].contentsScale = d->mapped_to_retina() ? 2. : 1.;
+ [view layer].contentsScale = d->mapped_to_retina() ? 2. : 1.;
}
}
#endif
@@ -1289,7 +1291,9 @@ static FLWindowDelegate *flwindowdelegate_instance = nil;
[nsw recursivelySendToSubwindows:@selector(setSubwindowFrame)];
[nsw recursivelySendToSubwindows:@selector(checkSubwindowFrame)];
if (window->as_gl_window() && Fl_X::i(window)) d->in_windowDidResize(false);
- if ([[nsw contentView] layer]) [(FLView*)[nsw contentView] viewFrameDidChange];
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
+ if (views_use_CA && [[nsw contentView] layer]) [(FLView*)[nsw contentView] viewFrameDidChange];
+#endif
fl_unlock_function();
}
- (void)windowDidResignKey:(NSNotification *)notif