macOS: remove mouse and key grabbing logic from Cocoa plugin

For QGuiApplication with QWindow, no other QPA plugins do
so, and for QApplication with QWidgets, QApplication implements popup
functionality consistently.

Task-number: QTBUG-96450
Change-Id: I47489296e0e470d8948ca7858d0a2608c58b2975
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
bb10
Volker Hilsheimer 2021-09-15 10:12:16 +02:00
parent a6279b74e2
commit 1e5249bfa4
2 changed files with 0 additions and 15 deletions

View File

@ -48,12 +48,6 @@
// FIXME: Why is this the top level window and not m_platformWindow?
QWindow *window = [self topLevelWindow];
if (QCocoaWindow *popup = QCocoaIntegration::instance()->activePopupWindow()) {
// Popups implicitly grab key events; forward to the active popup if there is one.
// This allows popups to e.g. intercept shortcuts and close the popup in response.
if (!popup->window()->flags().testFlag(Qt::ToolTip))
window = popup->window();
}
// We will send a key event unless the input method handles it
QBoolBlocker sendKeyEventGuard(m_sendKeyEvent, true);

View File

@ -146,15 +146,6 @@ static const QPointingDevice *pointingDeviceFor(qint64 deviceID)
if (!targetView.platformWindow)
return;
// Popups implicitly grap mouse events; forward to the active popup if there is one
if (QCocoaWindow *popup = QCocoaIntegration::instance()->activePopupWindow()) {
// Tooltips must be transparent for mouse events
// The bug reference is QTBUG-46379
if (!popup->window()->flags().testFlag(Qt::ToolTip)) {
if (QNSView *popupView = qnsview_cast(popup->view()))
targetView = popupView;
}
}
[targetView convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&qtWindowPoint andScreenPoint:&qtScreenPoint];
ulong timestamp = [theEvent timestamp] * 1000;