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
This commit is contained in:
parent
185934b9b0
commit
61eb23a9ea
@ -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());
|
||||
}
|
||||
}
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user