Fix a bug appeared in macOS 10.15 Catalina Beta about GUI scaling transient window.

The bug is that the app freezes for a few seconds before the yellow transient window is closed
if the close message is set from within a timer callback.
If the window to close returns NO to the canBecomeKeyWindow message, the bug does not occur.
Anyway it's good that canBecomeKeyWindow returns NO for a window with the OUTPUT flag.
This commit is contained in:
ManoloFLTK 2019-07-03 15:19:44 +02:00
parent a46060495d
commit ef1c937606

View File

@ -640,7 +640,7 @@ void Fl_Cocoa_Screen_Driver::breakMacEventLoop()
if (Fl::modal_ && (Fl::modal_ != w))
return NO; // prevent the caption to be redrawn as active on click
// when another modal window is currently the key win
return !(!w || w->tooltip_window() || w->menu_window() || w->parent());
return !(!w || w->output() || w->tooltip_window() || w->menu_window() || w->parent());
}
- (BOOL)canBecomeMainWindow