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
This commit is contained in:
Martin Gräßlin 2016-04-25 10:36:42 +02:00
parent bfa31d48cd
commit a0919d6c4d

View file

@ -966,7 +966,7 @@ bool Toplevel::setupCompositing()
if (damage_handle != XCB_NONE) if (damage_handle != XCB_NONE)
return false; return false;
if (kwinApp()->operationMode() == Application::OperationModeX11) { if (kwinApp()->operationMode() == Application::OperationModeX11 && !surface()) {
damage_handle = xcb_generate_id(connection()); damage_handle = xcb_generate_id(connection());
xcb_damage_create(connection(), damage_handle, frameId(), XCB_DAMAGE_REPORT_LEVEL_NON_EMPTY); xcb_damage_create(connection(), damage_handle, frameId(), XCB_DAMAGE_REPORT_LEVEL_NON_EMPTY);
} }