macOS: Return false from set(Keyboard/Mouse)GrabEnabled
[ChangeLog][macOS] QWindow::setKeyboardGrabEnabled() and QWindow::setMouseGrabEnabled() now returns false, as the feature is not implemented on macOS yet. If you were relying on these functions to make the window key (activate it), please use QWindow::requestActivate() instead. Task-number: QTBUG-106597 Change-Id: I86d7d806080aae98c9aec5287adfcc8cb70d372a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>bb10
parent
8c7bf85192
commit
27c91dbd36
|
|
@ -1078,28 +1078,14 @@ void QCocoaWindow::setMask(const QRegion ®ion)
|
|||
}
|
||||
}
|
||||
|
||||
bool QCocoaWindow::setKeyboardGrabEnabled(bool grab)
|
||||
bool QCocoaWindow::setKeyboardGrabEnabled(bool)
|
||||
{
|
||||
qCDebug(lcQpaWindow) << "QCocoaWindow::setKeyboardGrabEnabled" << window() << grab;
|
||||
if (!isContentView())
|
||||
return false;
|
||||
|
||||
if (grab && ![m_view.window isKeyWindow])
|
||||
[m_view.window makeKeyWindow];
|
||||
|
||||
return true;
|
||||
return false; // FIXME (QTBUG-106597)
|
||||
}
|
||||
|
||||
bool QCocoaWindow::setMouseGrabEnabled(bool grab)
|
||||
bool QCocoaWindow::setMouseGrabEnabled(bool)
|
||||
{
|
||||
qCDebug(lcQpaWindow) << "QCocoaWindow::setMouseGrabEnabled" << window() << grab;
|
||||
if (!isContentView())
|
||||
return false;
|
||||
|
||||
if (grab && ![m_view.window isKeyWindow])
|
||||
[m_view.window makeKeyWindow];
|
||||
|
||||
return true;
|
||||
return false; // FIXME (QTBUG-106597)
|
||||
}
|
||||
|
||||
WId QCocoaWindow::winId() const
|
||||
|
|
|
|||
Loading…
Reference in New Issue