mirror of
https://github.com/crystalidea/qt-build-tools.git
synced 2024-11-23 03:10:06 +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])
|
if (grab && ![m_nsWindow isKeyWindow])
|
||||||
[m_nsWindow makeKeyWindow];
|
[m_nsWindow makeKeyWindow];
|
||||||
else if (!grab && [m_nsWindow isKeyWindow])
|
|
||||||
[m_nsWindow resignKeyWindow];
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1147,8 +1146,7 @@ bool QCocoaWindow::setMouseGrabEnabled(bool grab)
|
|||||||
|
|
||||||
if (grab && ![m_nsWindow isKeyWindow])
|
if (grab && ![m_nsWindow isKeyWindow])
|
||||||
[m_nsWindow makeKeyWindow];
|
[m_nsWindow makeKeyWindow];
|
||||||
else if (!grab && [m_nsWindow isKeyWindow])
|
|
||||||
[m_nsWindow resignKeyWindow];
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -653,7 +653,9 @@ QT_WARNING_POP
|
|||||||
|
|
||||||
- (BOOL)becomeFirstResponder
|
- (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;
|
return NO;
|
||||||
if (!m_platformWindow->windowIsPopupType() && !m_isMenuView)
|
if (!m_platformWindow->windowIsPopupType() && !m_isMenuView)
|
||||||
QWindowSystemInterface::handleWindowActivated([self topLevelWindow]);
|
QWindowSystemInterface::handleWindowActivated([self topLevelWindow]);
|
||||||
@ -662,11 +664,13 @@ QT_WARNING_POP
|
|||||||
|
|
||||||
- (BOOL)acceptsFirstResponder
|
- (BOOL)acceptsFirstResponder
|
||||||
{
|
{
|
||||||
|
if (!m_window || !m_platformWindow)
|
||||||
|
return NO;
|
||||||
if (m_isMenuView)
|
if (m_isMenuView)
|
||||||
return NO;
|
return NO;
|
||||||
if (m_platformWindow->shouldRefuseKeyWindowAndFirstResponder())
|
if (m_platformWindow->shouldRefuseKeyWindowAndFirstResponder())
|
||||||
return NO;
|
return NO;
|
||||||
if (m_window && (m_window->flags() & Qt::WindowTransparentForInput) )
|
if (m_window->flags() & Qt::WindowTransparentForInput)
|
||||||
return NO;
|
return NO;
|
||||||
if ((m_window->flags() & Qt::ToolTip) == Qt::ToolTip)
|
if ((m_window->flags() & Qt::ToolTip) == Qt::ToolTip)
|
||||||
return NO;
|
return NO;
|
||||||
@ -676,7 +680,9 @@ QT_WARNING_POP
|
|||||||
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
|
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
|
||||||
{
|
{
|
||||||
Q_UNUSED(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 NO;
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user