Fix window moving between retina/non-retina display with a GL subwindow.

This commit is contained in:
ManoloFLTK 2019-08-27 17:44:31 +02:00
parent 4870cde0a6
commit 17d155d916
1 changed files with 1 additions and 1 deletions

View File

@ -2178,7 +2178,7 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
Fl_Window *window = [(FLWindow*)[self window] getFl_Window];
Fl_Cocoa_Window_Driver *d = Fl_Cocoa_Window_Driver::driver(window);
bool previous = d->mapped_to_retina();
NSView *view = window->parent() ? [fl_xid(window->top_window()) contentView] : self;
NSView *view = (window->parent() && !window->as_gl_window()) ? [fl_xid(window->top_window()) contentView] : self;
if (view) {
NSSize s = [view convertSizeToBacking:NSMakeSize(10, 10)]; // 10.7
d->mapped_to_retina( int(s.width + 0.5) > 10 );