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.
This commit is contained in:
Vlad Zahorodnii 2021-02-03 21:40:10 +02:00
parent d23dab7be9
commit dd1b45d828

View file

@ -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();