Don't call xcb_damage_subtract for Wayland windows

Summary:
Instead of checking the operation mode for X11, we check whether the
damage_handle is created. This fixes a bad damage warning for Wayland
windows in kwin_x11.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1490
This commit is contained in:
Martin Gräßlin 2016-04-25 15:35:18 +02:00
parent ac1a8a0142
commit 1845881fbf

View file

@ -1054,7 +1054,7 @@ bool Toplevel::resetAndFetchDamage()
if (!m_isDamaged)
return false;
if (kwinApp()->operationMode() != Application::OperationModeX11) {
if (damage_handle == XCB_NONE) {
m_isDamaged = false;
return true;
}