5.6.1 from final version of 5.6.1

This commit is contained in:
kleuter 2016-06-08 20:07:18 +02:00
parent 75f80f8bb5
commit f7f9e22235
2 changed files with 11 additions and 7 deletions

View File

@ -1135,8 +1135,7 @@ bool QCocoaWindow::setKeyboardGrabEnabled(bool grab)
if (grab && ![m_nsWindow isKeyWindow])
[m_nsWindow makeKeyWindow];
else if (!grab && [m_nsWindow isKeyWindow])
[m_nsWindow resignKeyWindow];
return true;
}
@ -1147,8 +1146,7 @@ bool QCocoaWindow::setMouseGrabEnabled(bool grab)
if (grab && ![m_nsWindow isKeyWindow])
[m_nsWindow makeKeyWindow];
else if (!grab && [m_nsWindow isKeyWindow])
[m_nsWindow resignKeyWindow];
return true;
}

View File

@ -653,7 +653,9 @@ QT_WARNING_POP
- (BOOL)becomeFirstResponder
{
if (m_window && (m_window->flags() & Qt::WindowTransparentForInput) )
if (!m_window || !m_platformWindow)
return NO;
if (m_window->flags() & Qt::WindowTransparentForInput)
return NO;
if (!m_platformWindow->windowIsPopupType() && !m_isMenuView)
QWindowSystemInterface::handleWindowActivated([self topLevelWindow]);
@ -662,11 +664,13 @@ QT_WARNING_POP
- (BOOL)acceptsFirstResponder
{
if (!m_window || !m_platformWindow)
return NO;
if (m_isMenuView)
return NO;
if (m_platformWindow->shouldRefuseKeyWindowAndFirstResponder())
return NO;
if (m_window && (m_window->flags() & Qt::WindowTransparentForInput) )
if (m_window->flags() & Qt::WindowTransparentForInput)
return NO;
if ((m_window->flags() & Qt::ToolTip) == Qt::ToolTip)
return NO;
@ -676,7 +680,9 @@ QT_WARNING_POP
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
{
Q_UNUSED(theEvent)
if (m_window && (m_window->flags() & Qt::WindowTransparentForInput) )
if (!m_window || !m_platformWindow)
return NO;
if (m_window->flags() & Qt::WindowTransparentForInput)
return NO;
return YES;
}