From 47127be7dd62dfd0af3e0022c9de5b2af9f54d62 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sat, 17 Nov 2018 16:05:11 +0000 Subject: [PATCH] MacOS: fix necessary for 10.14.2 public beta 3 Apple keeps changing how windows are drawn under 10.14 Mojave, even between minor releases! This change is required to correctly update a GL window moved from a non-retina to a retina display under 10.14.2 public beta 3 (glpuzzle shows the problem). It's unsure if it will still be necessary with 10.14.2, or later versions, but the change does no harm if it's not necessary. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13125 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 1617be591..d04724ec2 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1445,9 +1445,11 @@ static FLWindowDelegate *flwindowdelegate_instance = nil; // useful for Mandelbrot to recreate the layer's bitmap [view displayLayer:[view layer]]; } - if (fl_mac_os_version < 101401 && window->parent() && window->as_gl_window() && Fl::use_high_res_GL()) { + if (fl_mac_os_version < 101401 && window->as_gl_window() && Fl::use_high_res_GL()) { [view layer].contentsScale = Fl_X::i(window)->mapped_to_retina() ? 2. : 1.; } + if (window->as_gl_window() && Fl::use_high_res_GL()) + window->redraw(); // necessary with 10.14.2 public beta 3 } #endif fl_unlock_function();