From 5572e390c4c1d7195520b95c206fc80d25110c0e Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Tue, 29 Aug 2023 19:18:49 +0200 Subject: [PATCH] XdgToplevelWindow: Consider app responsive only if sent ping was received > Pass the serial specified in the event back to the compositor by sending > a "pong" request back with the specified serial. --- src/xdgshellwindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xdgshellwindow.cpp b/src/xdgshellwindow.cpp index 15f42f470a..ce672a6c6e 100644 --- a/src/xdgshellwindow.cpp +++ b/src/xdgshellwindow.cpp @@ -1126,8 +1126,9 @@ void XdgToplevelWindow::handlePingDelayed(quint32 serial) void XdgToplevelWindow::handlePongReceived(quint32 serial) { - m_pings.remove(serial); - setUnresponsive(false); + if (m_pings.remove(serial)) { + setUnresponsive(false); + } } void XdgToplevelWindow::handleMaximumSizeChanged()