mirror of
https://github.com/crystalidea/qt-build-tools.git
synced 2024-11-22 19:00:04 +08:00
5.6.1 from final version of 5.6.1
This commit is contained in:
parent
75f80f8bb5
commit
f7f9e22235
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user