diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-11-20 13:10:25 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-11-23 02:37:12 +0100 |
commit | 8723daf6969c682043a7080a2eaa9106463bb492 (patch) | |
tree | 01f975fd2bce52218d0ae042fac06ee089d20e83 | |
parent | 5ab2b8b95156f74210f9d6cc49a62f9e3a82c9ec (diff) |
Rename QWSI::handleWindowActivated to QWSI::handleFocusWindowChanged
A single QWindow is QGuiApplication::focusWindow() at a time, and this
window is typically also QWindow::isActive(), but other windows may also
be QWindow::isActive(). For example, we treat any sibling or ancestor
of the focusWindow as being QWindow::isActive() as well.
In addition, in the case of non-QWindow child windows, we may have to
query the platform for the activation state, which means we also need
a way for the platform to reflect changes in this state through QWSI.
The current API for this, QWSI::handleWindowActivated, is in practice
a focus window change API, so as a first step let's rename it to better
reflect what it's doing.
Task-number: QTBUG-119287
Change-Id: I381baf8505dd13a4a829c961095a8d2ed120092b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
19 files changed, 50 insertions, 48 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 14b50881c7..df141c4e32 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2087,8 +2087,8 @@ void Q_TRACE_INSTRUMENT(qtgui) QGuiApplicationPrivate::processWindowSystemEvent( case QWindowSystemInterfacePrivate::Leave: QGuiApplicationPrivate::processLeaveEvent(static_cast<QWindowSystemInterfacePrivate::LeaveEvent *>(e)); break; - case QWindowSystemInterfacePrivate::ActivatedWindow: - QGuiApplicationPrivate::processActivatedEvent(static_cast<QWindowSystemInterfacePrivate::ActivatedWindowEvent *>(e)); + case QWindowSystemInterfacePrivate::FocusWindow: + QGuiApplicationPrivate::processFocusWindowEvent(static_cast<QWindowSystemInterfacePrivate::FocusWindowEvent *>(e)); break; case QWindowSystemInterfacePrivate::WindowStateChanged: QGuiApplicationPrivate::processWindowStateChangedEvent(static_cast<QWindowSystemInterfacePrivate::WindowStateChangedEvent *>(e)); @@ -2511,10 +2511,10 @@ void QGuiApplicationPrivate::processLeaveEvent(QWindowSystemInterfacePrivate::Le QCoreApplication::sendSpontaneousEvent(e->leave.data(), &event); } -void QGuiApplicationPrivate::processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent *e) +void QGuiApplicationPrivate::processFocusWindowEvent(QWindowSystemInterfacePrivate::FocusWindowEvent *e) { QWindow *previous = QGuiApplicationPrivate::focus_window; - QWindow *newFocus = e->activated.data(); + QWindow *newFocus = e->focused.data(); if (previous == newFocus) return; diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 5d257b1fc7..58c3f33394 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -115,7 +115,8 @@ public: static void processEnterEvent(QWindowSystemInterfacePrivate::EnterEvent *e); static void processLeaveEvent(QWindowSystemInterfacePrivate::LeaveEvent *e); - static void processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent *e); + static void processFocusWindowEvent(QWindowSystemInterfacePrivate::FocusWindowEvent *e); + static void processWindowStateChangedEvent(QWindowSystemInterfacePrivate::WindowStateChangedEvent *e); static void processWindowScreenChangedEvent(QWindowSystemInterfacePrivate::WindowScreenChangedEvent *e); static void processWindowDevicePixelRatioChangedEvent(QWindowSystemInterfacePrivate::WindowDevicePixelRatioChangedEvent *e); diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp index e2c9fc4141..3baa48247b 100644 --- a/src/gui/kernel/qplatformwindow.cpp +++ b/src/gui/kernel/qplatformwindow.cpp @@ -370,18 +370,18 @@ void QPlatformWindow::setMask(const QRegion ®ion) Reimplement to let Qt be able to request activation/focus for a window Some window systems will probably not have callbacks for this functionality, - and then calling QWindowSystemInterface::handleWindowActivated(QWindow *w) + and then calling QWindowSystemInterface::handleFocusWindowChanged(QWindow *w) would be sufficient. If the window system has some event handling/callbacks then call - QWindowSystemInterface::handleWindowActivated(QWindow *w) when the window system + QWindowSystemInterface::handleFocusWindowChanged(QWindow *w) when the window system gives the notification. - Default implementation calls QWindowSystem::handleWindowActivated(QWindow *w) + Default implementation calls QWindowSystem::handleFocusWindowChanged(QWindow *w) */ void QPlatformWindow::requestActivateWindow() { - QWindowSystemInterface::handleWindowActivated(window()); + QWindowSystemInterface::handleFocusWindowChanged(window()); } /*! diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index be2157c8b9..223a32e573 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -240,9 +240,9 @@ void QWindowSystemInterface::handleEnterLeaveEvent(QWindow *enter, QWindow *leav handleEnterEvent(enter, local, global); } -QT_DEFINE_QPA_EVENT_HANDLER(void, handleWindowActivated, QWindow *window, Qt::FocusReason r) +QT_DEFINE_QPA_EVENT_HANDLER(void, handleFocusWindowChanged, QWindow *window, Qt::FocusReason r) { - handleWindowSystemEvent<QWindowSystemInterfacePrivate::ActivatedWindowEvent, Delivery>(window, r); + handleWindowSystemEvent<QWindowSystemInterfacePrivate::FocusWindowEvent, Delivery>(window, r); } QT_DEFINE_QPA_EVENT_HANDLER(void, handleWindowStateChanged, QWindow *window, Qt::WindowStates newState, int oldState) diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h index 29ecd65615..4fc61a475d 100644 --- a/src/gui/kernel/qwindowsysteminterface.h +++ b/src/gui/kernel/qwindowsysteminterface.h @@ -157,8 +157,9 @@ public: template<typename Delivery = QWindowSystemInterface::DefaultDelivery> static void handleLeaveEvent(QWindow *window); static void handleEnterLeaveEvent(QWindow *enter, QWindow *leave, const QPointF &local = QPointF(), const QPointF& global = QPointF()); + template<typename Delivery = QWindowSystemInterface::DefaultDelivery> - static void handleWindowActivated(QWindow *window, Qt::FocusReason r = Qt::OtherFocusReason); + static void handleFocusWindowChanged(QWindow *window, Qt::FocusReason r = Qt::OtherFocusReason); template<typename Delivery = QWindowSystemInterface::DefaultDelivery> static void handleWindowStateChanged(QWindow *window, Qt::WindowStates newState, int oldState = -1); diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h index b08abc0a95..51ab58fc99 100644 --- a/src/gui/kernel/qwindowsysteminterface_p.h +++ b/src/gui/kernel/qwindowsysteminterface_p.h @@ -40,7 +40,7 @@ public: GeometryChange = 0x02, Enter = UserInputEvent | 0x03, Leave = UserInputEvent | 0x04, - ActivatedWindow = 0x05, + FocusWindow = 0x05, WindowStateChanged = 0x06, Mouse = UserInputEvent | 0x07, Wheel = UserInputEvent | 0x09, @@ -125,12 +125,12 @@ public: QPointer<QWindow> leave; }; - class ActivatedWindowEvent : public WindowSystemEvent { + class FocusWindowEvent : public WindowSystemEvent { public: - explicit ActivatedWindowEvent(QWindow *activatedWindow, Qt::FocusReason r) - : WindowSystemEvent(ActivatedWindow), activated(activatedWindow), reason(r) + explicit FocusWindowEvent(QWindow *focusedWindow, Qt::FocusReason r) + : WindowSystemEvent(FocusWindow), focused(focusedWindow), reason(r) { } - QPointer<QWindow> activated; + QPointer<QWindow> focused; Qt::FocusReason reason; }; diff --git a/src/platformsupport/fbconvenience/qfbscreen.cpp b/src/platformsupport/fbconvenience/qfbscreen.cpp index e804488005..85e2f57198 100644 --- a/src/platformsupport/fbconvenience/qfbscreen.cpp +++ b/src/platformsupport/fbconvenience/qfbscreen.cpp @@ -63,7 +63,7 @@ void QFbScreen::addWindow(QFbWindow *window) } setDirty(window->geometry()); QWindow *w = topWindow(); - QWindowSystemInterface::handleWindowActivated(w); + QWindowSystemInterface::handleFocusWindowChanged(w); topWindowChanged(w); } @@ -72,7 +72,7 @@ void QFbScreen::removeWindow(QFbWindow *window) mWindowStack.removeOne(window); setDirty(window->geometry()); QWindow *w = topWindow(); - QWindowSystemInterface::handleWindowActivated(w); + QWindowSystemInterface::handleFocusWindowChanged(w); topWindowChanged(w); } @@ -84,7 +84,7 @@ void QFbScreen::raise(QFbWindow *window) mWindowStack.move(index, 0); setDirty(window->geometry()); QWindow *w = topWindow(); - QWindowSystemInterface::handleWindowActivated(w); + QWindowSystemInterface::handleFocusWindowChanged(w); topWindowChanged(w); } @@ -96,7 +96,7 @@ void QFbScreen::lower(QFbWindow *window) mWindowStack.move(index, mWindowStack.size() - 1); setDirty(window->geometry()); QWindow *w = topWindow(); - QWindowSystemInterface::handleWindowActivated(w); + QWindowSystemInterface::handleFocusWindowChanged(w); topWindowChanged(w); } diff --git a/src/plugins/platforms/android/qandroidplatformscreen.cpp b/src/plugins/platforms/android/qandroidplatformscreen.cpp index e31b618008..20f414b48f 100644 --- a/src/plugins/platforms/android/qandroidplatformscreen.cpp +++ b/src/plugins/platforms/android/qandroidplatformscreen.cpp @@ -184,7 +184,7 @@ void QAndroidPlatformScreen::addWindow(QAndroidPlatformWindow *window) } QWindow *w = topWindow(); - QWindowSystemInterface::handleWindowActivated(w, Qt::ActiveWindowFocusReason); + QWindowSystemInterface::handleFocusWindowChanged(w, Qt::ActiveWindowFocusReason); topWindowChanged(w); } @@ -204,7 +204,7 @@ void QAndroidPlatformScreen::removeWindow(QAndroidPlatformWindow *window) } QWindow *w = topWindow(); - QWindowSystemInterface::handleWindowActivated(w, Qt::ActiveWindowFocusReason); + QWindowSystemInterface::handleFocusWindowChanged(w, Qt::ActiveWindowFocusReason); topWindowChanged(w); } @@ -221,7 +221,7 @@ void QAndroidPlatformScreen::raise(QAndroidPlatformWindow *window) setDirty(window->geometry()); } QWindow *w = topWindow(); - QWindowSystemInterface::handleWindowActivated(w, Qt::ActiveWindowFocusReason); + QWindowSystemInterface::handleFocusWindowChanged(w, Qt::ActiveWindowFocusReason); topWindowChanged(w); } @@ -238,7 +238,7 @@ void QAndroidPlatformScreen::lower(QAndroidPlatformWindow *window) setDirty(window->geometry()); } QWindow *w = topWindow(); - QWindowSystemInterface::handleWindowActivated(w, Qt::ActiveWindowFocusReason); + QWindowSystemInterface::handleFocusWindowChanged(w, Qt::ActiveWindowFocusReason); topWindowChanged(w); } diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 05b9f19fec..0533a6e1e9 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -1261,8 +1261,8 @@ void QCocoaWindow::windowDidBecomeKey() return; // See also [QNSView becomeFirstResponder] - QWindowSystemInterface::handleWindowActivated<QWindowSystemInterface::SynchronousDelivery>( - focusCocoaWindow->window(), Qt::ActiveWindowFocusReason); + QWindowSystemInterface::handleFocusWindowChanged<QWindowSystemInterface::SynchronousDelivery>( + window(), Qt::ActiveWindowFocusReason); } void QCocoaWindow::windowDidResignKey() @@ -1288,7 +1288,7 @@ void QCocoaWindow::windowDidResignKey() // Lost key window, go ahead and set the active window to zero if (!windowIsPopupType()) { - QWindowSystemInterface::handleWindowActivated<QWindowSystemInterface::SynchronousDelivery>( + QWindowSystemInterface::handleFocusWindowChanged<QWindowSystemInterface::SynchronousDelivery>( nullptr, Qt::ActiveWindowFocusReason); } } diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index faeb75ed2e..b3b3ec40cd 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -328,7 +328,7 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSViewMenuHelper); // QWindow activation from QCocoaWindow::windowDidBecomeKey instead. The only // exception is if the window can never become key, in which case we naturally // cannot wait for that to happen. - QWindowSystemInterface::handleWindowActivated<QWindowSystemInterface::SynchronousDelivery>( + QWindowSystemInterface::handleFocusWindowChanged<QWindowSystemInterface::SynchronousDelivery>( [self topLevelWindow], Qt::ActiveWindowFocusReason); } diff --git a/src/plugins/platforms/directfb/qdirectfbinput.cpp b/src/plugins/platforms/directfb/qdirectfbinput.cpp index 516dc1e9d8..c5aacad6cc 100644 --- a/src/plugins/platforms/directfb/qdirectfbinput.cpp +++ b/src/plugins/platforms/directfb/qdirectfbinput.cpp @@ -176,7 +176,7 @@ void QDirectFbInput::handleEnterLeaveEvents(const DFBEvent &event) void QDirectFbInput::handleGotFocusEvent(const DFBEvent &event) { QWindow *tlw = m_tlwMap.value(event.window.window_id); - QWindowSystemInterface::handleWindowActivated(tlw, Qt::ActiveWindowFocusReason); + QWindowSystemInterface::handleFocusWindowChanged(tlw, Qt::ActiveWindowFocusReason); } void QDirectFbInput::handleCloseEvent(const DFBEvent &event) diff --git a/src/plugins/platforms/eglfs/api/qeglfswindow.cpp b/src/plugins/platforms/eglfs/api/qeglfswindow.cpp index 1a31f97d7b..306d121cfb 100644 --- a/src/plugins/platforms/eglfs/api/qeglfswindow.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfswindow.cpp @@ -263,7 +263,7 @@ void QEglFSWindow::requestActivateWindow() QOpenGLCompositor::instance()->moveToTop(this); #endif QWindow *wnd = window(); - QWindowSystemInterface::handleWindowActivated(wnd, Qt::ActiveWindowFocusReason); + QWindowSystemInterface::handleFocusWindowChanged(wnd, Qt::ActiveWindowFocusReason); QWindowSystemInterface::handleExposeEvent(wnd, QRect(QPoint(0, 0), wnd->geometry().size())); } diff --git a/src/plugins/platforms/haiku/qhaikuwindow.cpp b/src/plugins/platforms/haiku/qhaikuwindow.cpp index 21bcad1749..3f2c6a889a 100644 --- a/src/plugins/platforms/haiku/qhaikuwindow.cpp +++ b/src/plugins/platforms/haiku/qhaikuwindow.cpp @@ -294,7 +294,7 @@ void QHaikuWindow::haikuWindowResized(const QSize &size, bool zoomInProgress) void QHaikuWindow::haikuWindowActivated(bool activated) { - QWindowSystemInterface::handleWindowActivated(activated ? window() : nullptr); + QWindowSystemInterface::handleFocusWindowChanged(activated ? window() : nullptr); } void QHaikuWindow::haikuWindowMinimized(bool minimize) diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm index 7b1de0ae71..40cf465b58 100644 --- a/src/plugins/platforms/ios/quiview.mm +++ b/src/plugins/platforms/ios/quiview.mm @@ -315,7 +315,7 @@ inline ulong getTimeStamp(UIEvent *event) } if (qGuiApp->focusWindow() != self.platformWindow->window()) - QWindowSystemInterface::handleWindowActivated(self.platformWindow->window(), Qt::ActiveWindowFocusReason); + QWindowSystemInterface::handleFocusWindowChanged(self.platformWindow->window(), Qt::ActiveWindowFocusReason); else qImDebug() << self.platformWindow->window() << "already active, not sending window activation"; @@ -352,7 +352,7 @@ inline ulong getTimeStamp(UIEvent *event) UIResponder *newResponder = FirstResponderCandidate::currentCandidate(); if ([self responderShouldTriggerWindowDeactivation:newResponder]) - QWindowSystemInterface::handleWindowActivated(nullptr, Qt::ActiveWindowFocusReason); + QWindowSystemInterface::handleFocusWindowChanged(nullptr, Qt::ActiveWindowFocusReason); return YES; } diff --git a/src/plugins/platforms/offscreen/qoffscreenwindow.cpp b/src/plugins/platforms/offscreen/qoffscreenwindow.cpp index 20ed0ed91b..1a1471c687 100644 --- a/src/plugins/platforms/offscreen/qoffscreenwindow.cpp +++ b/src/plugins/platforms/offscreen/qoffscreenwindow.cpp @@ -86,7 +86,7 @@ void QOffscreenWindow::setVisible(bool visible) if (visible) { if (window()->type() != Qt::ToolTip) - QWindowSystemInterface::handleWindowActivated(window(), Qt::ActiveWindowFocusReason); + QWindowSystemInterface::handleFocusWindowChanged(window(), Qt::ActiveWindowFocusReason); if (m_pendingGeometryChangeOnShow) { m_pendingGeometryChangeOnShow = false; @@ -122,7 +122,7 @@ void QOffscreenWindow::setVisible(bool visible) void QOffscreenWindow::requestActivateWindow() { if (m_visible) - QWindowSystemInterface::handleWindowActivated(window(), Qt::ActiveWindowFocusReason); + QWindowSystemInterface::handleFocusWindowChanged(window(), Qt::ActiveWindowFocusReason); } WId QOffscreenWindow::winId() const diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp index ea32a6fd09..e93a38f62c 100644 --- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp +++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp @@ -710,7 +710,7 @@ void QQnxScreenEventHandler::handleKeyboardFocusPropertyEvent(screen_window_t wi } if (focus && focusWindow != QGuiApplication::focusWindow()) - QWindowSystemInterface::handleWindowActivated(focusWindow, Qt::ActiveWindowFocusReason); + QWindowSystemInterface::handleFocusWindowChanged(focusWindow, Qt::ActiveWindowFocusReason); else if (!focus && focusWindow == QGuiApplication::focusWindow()) m_focusLostTimer = startTimer(50); } diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 6ce2014071..c2e1df0521 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -1415,7 +1415,7 @@ void QWindowsContext::handleFocusEvent(QtWindows::WindowsEventType et, } if (nextActiveWindow != d->m_lastActiveWindow) { d->m_lastActiveWindow = nextActiveWindow; - QWindowSystemInterface::handleWindowActivated(nextActiveWindow, Qt::ActiveWindowFocusReason); + QWindowSystemInterface::handleFocusWindowChanged(nextActiveWindow, Qt::ActiveWindowFocusReason); } } diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index ff13b420d7..1056c6408f 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -94,7 +94,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra m_focusInTimer.setInterval(focusInDelay); m_focusInTimer.callOnTimeout(this, []() { // No FocusIn events for us, proceed with FocusOut normally. - QWindowSystemInterface::handleWindowActivated(nullptr, Qt::ActiveWindowFocusReason); + QWindowSystemInterface::handleFocusWindowChanged(nullptr, Qt::ActiveWindowFocusReason); }); sync(); diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index dc9d7257b1..78f5b54fd1 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -854,7 +854,7 @@ void QXcbWindow::doFocusIn() return; QWindow *w = static_cast<QWindowPrivate *>(QObjectPrivate::get(window()))->eventReceiver(); connection()->setFocusWindow(w); - QWindowSystemInterface::handleWindowActivated(w, Qt::ActiveWindowFocusReason); + QWindowSystemInterface::handleFocusWindowChanged(w, Qt::ActiveWindowFocusReason); } void QXcbWindow::doFocusOut() @@ -2477,15 +2477,15 @@ void QXcbWindow::sendXEmbedMessage(xcb_window_t window, quint32 message, xcb_send_event(xcb_connection(), false, window, XCB_EVENT_MASK_NO_EVENT, (const char *)&event); } -static bool activeWindowChangeQueued(const QWindow *window) +static bool focusWindowChangeQueued(const QWindow *window) { /* Check from window system event queue if the next queued activation * targets a window other than @window. */ - QWindowSystemInterfacePrivate::ActivatedWindowEvent *systemEvent = - static_cast<QWindowSystemInterfacePrivate::ActivatedWindowEvent *> - (QWindowSystemInterfacePrivate::peekWindowSystemEvent(QWindowSystemInterfacePrivate::ActivatedWindow)); - return systemEvent && systemEvent->activated != window; + QWindowSystemInterfacePrivate::FocusWindowEvent *systemEvent = + static_cast<QWindowSystemInterfacePrivate::FocusWindowEvent *> + (QWindowSystemInterfacePrivate::peekWindowSystemEvent(QWindowSystemInterfacePrivate::FocusWindow)); + return systemEvent && systemEvent->focused != window; } void QXcbWindow::handleXEmbedMessage(const xcb_client_message_event_t *event) @@ -2515,13 +2515,13 @@ void QXcbWindow::handleXEmbedMessage(const xcb_client_message_event_t *event) break; } connection()->setFocusWindow(window()); - QWindowSystemInterface::handleWindowActivated(window(), reason); + QWindowSystemInterface::handleFocusWindowChanged(window(), reason); break; case XEMBED_FOCUS_OUT: if (window() == QGuiApplication::focusWindow() - && !activeWindowChangeQueued(window())) { + && !focusWindowChangeQueued(window())) { connection()->setFocusWindow(nullptr); - QWindowSystemInterface::handleWindowActivated(nullptr); + QWindowSystemInterface::handleFocusWindowChanged(nullptr); } break; } |