From e1893334fd1e2377635b6488945f730263b04fd9 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sat, 23 Dec 2017 06:34:42 +0000 Subject: Continue support for GUI rescaling under MacOS: fix Fl_Overlay_Window. This patch also improves by simplification the code of class Fl_Quartz_Image_Surface_Driver: because, under the driver model, there's a separate graphics content for the display and for each offscreen buffer, it's possible to reverse the drawing orientation (draw from top to bottom) once at offscreen creation. It's thus no longer necessary to reverse orientation in Fl_Quartz_Graphics_Driver::restore_clip() specifically for offscreen buffers. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12603 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Fl_cocoa.mm') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index b36ca5ae8..8cbf3aca9 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3349,6 +3349,10 @@ void Fl_Cocoa_Window_Driver::make_current() fl_window = i->xid; ((Fl_Quartz_Graphics_Driver&)Fl_Graphics_Driver::default_driver()).high_resolution( mapped_to_retina() ); + if (pWindow->as_overlay_window() && other_xid && changed_resolution()) { + destroy_double_buffer(); + changed_resolution(false); + } NSGraphicsContext *nsgc; #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 if (fl_mac_os_version >= 100400) -- cgit v1.2.3