summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2018-10-29 15:30:44 +0000
committerManolo Gouy <Manolo>2018-10-29 15:30:44 +0000
commit61eb23a9ea106e82e3fd0649e68859cb6e950e0f (patch)
treeca9a0cfec7961cd2ba0b76ad14da5274f9f03256
parent185934b9b0cfb118f7e6251521f8aaafe7e22675 (diff)
Fix handling of GL window moved between retina and non-retina screens.
Part of the fix applies both to layer-backed and non layer-backed windows. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13090 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/Fl_Gl_Window.cxx1
-rw-r--r--src/Fl_cocoa.mm6
2 files changed, 4 insertions, 3 deletions
diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx
index 7d4ad1a3f..2835f129d 100644
--- a/src/Fl_Gl_Window.cxx
+++ b/src/Fl_Gl_Window.cxx
@@ -558,6 +558,7 @@ void Fl_Cocoa_Gl_Window_Driver::make_current_before() {
if (d->changed_resolution()){
d->changed_resolution(false);
invalidate();
+ pWindow->valid(0);
GLcontext_update(pWindow->context());
}
}
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 759da3411..e1f5d44be 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -1252,9 +1252,9 @@ static FLWindowDelegate *flwindowdelegate_instance = nil;
[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]) {
- if (window->as_gl_window()) { // move layered GL window to different resolution
- window->as_gl_window()->valid(0);
- } else [(FLView*)[nsw contentView] viewFrameDidChange];
+ if (!window->as_gl_window()) { // move layered non-GL window to different resolution
+ [(FLView*)[nsw contentView] viewFrameDidChange];
+ }
if (window->parent()) {
[nsw setSubwindowFrame];
[[nsw contentView] display];