From 018f74448da9bfc71063f9255bf8d9f90153a621 Mon Sep 17 00:00:00 2001 From: svan71 <48870638+svan71@users.noreply.github.com> Date: Sat, 11 Jul 2026 01:53:08 -0400 Subject: [PATCH] fix: compare winId consistently in _q_onWindowMotifHintsChanged The slot receives winId as quint32 (eventFilter and the DWindowManagerHelper windowMotifWMHintsChanged signal both deliver it truncated to 32 bits), but the identity guard compared it against the full-width WId from QWindow::winId(). On X11 WId is a 32-bit XID so it worked; on Wayland/Qt6.11 WId is a 64-bit pointer (>4GiB), so the guard is always true and the slot returns before fetching Motif functions, leaving motifFunctions at 0 and disabling the minimize/close buttons on DTK client titlebars (e.g. dde-control-center). --- src/dquickwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dquickwindow.cpp b/src/dquickwindow.cpp index 64210d35..42966570 100644 --- a/src/dquickwindow.cpp +++ b/src/dquickwindow.cpp @@ -214,7 +214,7 @@ void DQuickWindowAttachedPrivate::_q_onWindowMotifHintsChanged(quint32 winId) if (!q->window()) return; - if (q->window()->winId() != winId) + if (static_cast(q->window()->winId()) != winId) return; auto functions_hints = DWindowManagerHelper::getMotifFunctions(q->window());