From 2a60557bf957c502fdc52544980dfa61a34d78b6 Mon Sep 17 00:00:00 2001 From: Ye ShanShan Date: Fri, 29 Nov 2024 18:12:03 +0800 Subject: [PATCH] fix: app crashed when window destroyed in quick as title. pms: BUG-368399 --- xcb/dnotitlebarwindowhelper.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xcb/dnotitlebarwindowhelper.cpp b/xcb/dnotitlebarwindowhelper.cpp index 1a6b898d..e7377691 100644 --- a/xcb/dnotitlebarwindowhelper.cpp +++ b/xcb/dnotitlebarwindowhelper.cpp @@ -514,6 +514,12 @@ bool DNoTitlebarWindowHelper::windowEvent(QEvent *event) { QWindow *w = this->window(); + // TODO Crashed when delete by Vtable. + if (event->type() == QEvent::DeferredDelete) { + VtableHook::resetVtable(w); + return w->event(event); + } + // get touch begin position static bool isTouchDown = false; static QPointF touchBeginPosition;