From 34fc962ff1a0311f21efc09e7a643c8a9f57e9d0 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 28 Jan 2020 21:56:41 +0200 Subject: [PATCH] Move definition of X11Client::damageNotifyEvent() to x11client.cpp One step closer to the bright future where one can disable X11 support at build time. --- toplevel.cpp | 19 ------------------- x11client.cpp | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/toplevel.cpp b/toplevel.cpp index 9506f8ea35..ca83f72d51 100644 --- a/toplevel.cpp +++ b/toplevel.cpp @@ -23,7 +23,6 @@ along with this program. If not, see . #include "activities.h" #endif #include "atoms.h" -#include "x11client.h" #include "client_machine.h" #include "composite.h" #include "effects.h" @@ -319,24 +318,6 @@ bool Toplevel::compositing() const return Workspace::self()->compositing(); } -void X11Client::damageNotifyEvent() -{ - if (m_syncRequest.isPending && isResize()) { - emit damaged(this, QRect()); - m_isDamaged = true; - return; - } - - if (!ready_for_painting) { // avoid "setReadyForPainting()" function calling overhead - if (m_syncRequest.counter == XCB_NONE) { // cannot detect complete redraw, consider done now - setReadyForPainting(); - setupWindowManagementInterface(); - } - } - - Toplevel::damageNotifyEvent(); -} - bool Toplevel::resetAndFetchDamage() { if (!m_isDamaged) diff --git a/x11client.cpp b/x11client.cpp index cbb0b5b009..0815d5b96f 100644 --- a/x11client.cpp +++ b/x11client.cpp @@ -4959,4 +4959,22 @@ void X11Client::applyWindowRules() setBlockingCompositing(info->isBlockingCompositing()); } +void X11Client::damageNotifyEvent() +{ + if (m_syncRequest.isPending && isResize()) { + emit damaged(this, QRect()); + m_isDamaged = true; + return; + } + + if (!readyForPainting()) { // avoid "setReadyForPainting()" function calling overhead + if (m_syncRequest.counter == XCB_NONE) { // cannot detect complete redraw, consider done now + setReadyForPainting(); + setupWindowManagementInterface(); + } + } + + AbstractClient::damageNotifyEvent(); +} + } // namespace