Fix handling of layer-backed sub GL window moved between retina and non-retina screens.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13093 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2018-10-29 17:09:37 +00:00
parent ac60de1a92
commit 71d7a9db79

View File

@ -1255,9 +1255,9 @@ static FLWindowDelegate *flwindowdelegate_instance = nil;
if (!window->as_gl_window()) { // move layered non-GL window to different resolution if (!window->as_gl_window()) { // move layered non-GL window to different resolution
[(FLView*)[nsw contentView] viewFrameDidChange]; [(FLView*)[nsw contentView] viewFrameDidChange];
} }
if (window->parent()) { if (fl_mac_os_version < 101401 && window->parent() && window->as_gl_window() && Fl::use_high_res_GL()) {
[nsw setSubwindowFrame]; Fl_Cocoa_Window_Driver *d = Fl_Cocoa_Window_Driver::driver(window);
[[nsw contentView] display]; [[nsw contentView] layer].contentsScale = d->mapped_to_retina() ? 2. : 1.;
} }
} }
#endif #endif