diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-09-13 17:43:10 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-09-13 19:26:11 +0000 |
commit | 27c91dbd36a5afa0c01ff3f4063e1f82c40b8089 (patch) | |
tree | adf591da477307af5164bb427aaddf63e7920b29 /src/plugins/platforms | |
parent | 8c7bf85192d81562db37fb8f4e6e018f7662112b (diff) |
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>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index ff8a15f0d6..07fee0a861 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -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 |