The cocoa plugin uses NSPanel instead of NSWindow
for popup-type windows. With the exception of tooltips
and splash screens these windows should take input
focus as well.
Change-Id: Icdf0854e7c511ccc106e035dae4763ae90c23aa5
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
- (BOOL)canBecomeKeyWindow
{
- return NO;
+ // Most panels can be come the key window. Exceptions are:
+ if (m_cocoaPlatformWindow->window()->windowType() == Qt::ToolTip)
+ return NO;
+ if (m_cocoaPlatformWindow->window()->windowType() == Qt::SplashScreen)
+ return NO;
+ return YES;
}
@end
defer:NO]; // Deferring window creation breaks OpenGL (the GL context is set up
// before the window is shown and needs a proper window.).
[window setHasShadow:YES];
+ window->m_cocoaPlatformWindow = this;
createdWindow = window;
} else {
styleMask = (NSResizableWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSTitledWindowMask);