From 515f3cbb4e716a2bf13cca5d585d886d1df4445c Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Sun, 23 Jun 2019 17:58:49 +0200 Subject: [PATCH] Avoid crash without XWayland Summary: readX11ShadowProperty fails without an X connection Test Plan: Tested by Kai who didn't have xwayland Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D21965 --- shadow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadow.cpp b/shadow.cpp index 2cbabb01bd..1699b837af 100644 --- a/shadow.cpp +++ b/shadow.cpp @@ -124,7 +124,7 @@ Shadow *Shadow::createShadowFromWayland(Toplevel *toplevel) QVector< uint32_t > Shadow::readX11ShadowProperty(xcb_window_t id) { QVector ret; - if (id != XCB_WINDOW) { + if (id != XCB_WINDOW_NONE) { Xcb::Property property(false, id, atoms->kde_net_wm_shadow, XCB_ATOM_CARDINAL, 0, 12); uint32_t *shadow = property.value(); if (shadow) {