From 2d223770ee33ddf7d93d83bc2cb538bfd66d38d9 Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: 周三, 08 5月 2024 11:30:55 +0800 Subject: [PATCH] update --- src/core/contexts/abstractwindowcontext.cpp | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/core/contexts/abstractwindowcontext.cpp b/src/core/contexts/abstractwindowcontext.cpp index 3b441c0..1c11015 100644 --- a/src/core/contexts/abstractwindowcontext.cpp +++ b/src/core/contexts/abstractwindowcontext.cpp @@ -185,7 +185,7 @@ void AbstractWindowContext::virtual_hook(int id, void *data) { switch (id) { case CentralizeHook: { - if (!m_windowHandle) + if (!m_windowId) return; QRect windowGeometry = m_delegate->getGeometry(m_host); @@ -199,7 +199,7 @@ } case RaiseWindowHook: { - if (!m_windowHandle) + if (!m_windowId) return; m_delegate->setWindowVisible(m_host, true); @@ -260,6 +260,12 @@ m_windowAttributes.insert(it.key(), it.value()); } } + + // Send to shared dispatchers + if (oldWinId != m_windowId) { + QEvent e(QEvent::WinIdChange); + sharedDispatch(m_host, &e); + } } QVariant AbstractWindowContext::windowAttribute(const QString &key) const { -- Gitblit v1.9.1