From dd1b45d8285fea4829343d8bb08cbd3e11578e5b Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 3 Feb 2021 21:40:10 +0200 Subject: [PATCH] x11: Simplify X11Client::damageNotifyEvent() The contents of the if branch is identical to the implementation of the Toplevel::damageNotifyEvent() function and setReadyForPainting() will never be called because m_syncRequest.isPending can be true only if the window supports sync counters. --- src/x11client.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/x11client.cpp b/src/x11client.cpp index f14bec78b8..6b88a29deb 100644 --- a/src/x11client.cpp +++ b/src/x11client.cpp @@ -4893,12 +4893,6 @@ bool X11Client::supportsWindowRules() const 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();