From a0919d6c4d775dec237fff98fb19ecc67812910d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 25 Apr 2016 10:36:42 +0200 Subject: [PATCH] Only create damage_handle for Toplevel's without a Wayland Surface Summary: If the Toplevel has a Wayland Surface we don't want an X11 damage handle. Ideally we would just check for the Surface and get rid of the operation mode check. But setupCompositing is called for Xwayland clients before the surface is set. Reviewers: #plasma Subscribers: plasma-devel Projects: #plasma Differential Revision: https://phabricator.kde.org/D1486 --- composite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composite.cpp b/composite.cpp index 3571681e4a..81feff0dc5 100644 --- a/composite.cpp +++ b/composite.cpp @@ -966,7 +966,7 @@ bool Toplevel::setupCompositing() if (damage_handle != XCB_NONE) return false; - if (kwinApp()->operationMode() == Application::OperationModeX11) { + if (kwinApp()->operationMode() == Application::OperationModeX11 && !surface()) { damage_handle = xcb_generate_id(connection()); xcb_damage_create(connection(), damage_handle, frameId(), XCB_DAMAGE_REPORT_LEVEL_NON_EMPTY); }