From 77f10f7c5eb8716c06eb7e0447c3fd8dbcb48d79 Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: ćšć, 21 12æ 2023 23:18:58 +0800 Subject: [PATCH] minor tweaks --- src/core/contexts/qtwindowcontext.cpp | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/core/contexts/qtwindowcontext.cpp b/src/core/contexts/qtwindowcontext.cpp index 4bbb0e6..9c05fa4 100644 --- a/src/core/contexts/qtwindowcontext.cpp +++ b/src/core/contexts/qtwindowcontext.cpp @@ -247,8 +247,15 @@ AbstractWindowContext::virtual_hook(id, data); } - void QtWindowContext::winIdChanged(QWindow *oldWindow) { - Q_UNUSED(oldWindow) + void QtWindowContext::winIdChanged() { + if (!m_windowHandle) { + m_delegate->setWindowFlags(m_host, m_delegate->getWindowFlags(m_host) & + ~Qt::FramelessWindowHint); + qtWindowEventFilter.reset(); + return; + } + + // Allocate new resources m_delegate->setWindowFlags(m_host, m_delegate->getWindowFlags(m_host) | Qt::FramelessWindowHint); qtWindowEventFilter = std::make_unique<QtWindowEventFilter>(this); -- Gitblit v1.9.1