D6047: WIP: Support XDG v6

Marco Martin noreply at phabricator.kde.org
Mon Jun 5 11:25:40 UTC 2017


mart added inline comments.

INLINE COMMENTS

> mart wrote in xdgshell_interface.h:80
> so storing all the ids of pings in progress somewhere to make a more recent ping not cancel an older one still pending?

from kwin, client.cpp:
i guess that's the kwin part that will have to use this.
it uses a single timer, and tries for a couple of timeout, as soon as the client answers it's considered good, no serial for pings is considered.

void Client::pingWindow()
{

  if (!info->supportsProtocol(NET::PingProtocol))
      return; // Can't ping :(
  if (options->killPingTimeout() == 0)
      return; // Turned off
  if (ping_timer != NULL)
      return; // Pinging already
  ping_timer = new QTimer(this);
  connect(ping_timer, &QTimer::timeout, this,
      [this]() {
          if (unresponsive()) {
              qCDebug(KWIN_CORE) << "Final ping timeout, asking to kill:" << caption();
              ping_timer->deleteLater();
              ping_timer = nullptr;
              killProcess(true, m_pingTimestamp);
              return;
          }
  
          qCDebug(KWIN_CORE) << "First ping timeout:" << caption();
  
          setUnresponsive(true);
          ping_timer->start();
      }
  );

REVISION DETAIL
  https://phabricator.kde.org/D6047

To: davidedmundson, #plasma
Cc: mart, plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170605/30f67fce/attachment-0001.html>


More information about the Plasma-devel mailing list