From 0ea9f98016303c7d46037d0905af70b7bc607179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A6=83=E6=9C=AC=E5=AD=A6?= Date: Wed, 28 Feb 2024 09:33:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DQt=20=E7=9A=84=20XCB?= =?UTF-8?q?=20=E5=90=8E=E7=AB=AF=20GetProperty=20=E6=9C=89=E5=A4=A7?= =?UTF-8?q?=E9=87=8F=E7=9A=84=20"BadAtom"=20=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 平台插件中判断_NET_KDE_COMPOSITE_TOGGLING是否为0,如果是0就不做处理 Log: 修复Qt 的 XCB 后端 GetProperty 有大量的 "BadAtom" 错误 Bug: https://pms.uniontech.com/bug-view-237955.html Influence: X11下应用日志 xcb"badatom"报错 Change-Id: I9620627f5b41c2a609d4df490eacdce802417a7f --- xcb/dxcbwmsupport.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xcb/dxcbwmsupport.cpp b/xcb/dxcbwmsupport.cpp index e6a14622..b2c7c569 100644 --- a/xcb/dxcbwmsupport.cpp +++ b/xcb/dxcbwmsupport.cpp @@ -171,6 +171,12 @@ void DXcbWMSupport::updateHasComposite() xcb_connection_t *xcb_connection = DPlatformIntegration::xcbConnection()->xcb_connection(); auto atom = Utility::internAtom("_NET_KDE_COMPOSITE_TOGGLING"); + + if (atom == 0) { + qWarning() << "The value of atom:_NET_KDE_COMPOSITE_TOGGLING is 0 !"; + return; + } + xcb_window_t root = DPlatformIntegration::xcbConnection()->primaryScreen()->root(); //stage1: check if _NET_KDE_COMPOSITE_TOGGLING is supported