if more ping arrives before a pong, store each of its
serial and manage them one by one
a new signal, pingTimeout emitted until explicitly stopped
davidedmundson | |
graesslin |
Plasma |
if more ping arrives before a pong, store each of its
serial and manage them one by one
a new signal, pingTimeout emitted until explicitly stopped
tests still pass, kwin modified to use it on window close
and window focus gain works correctly.
What is not tested: apps not answering to pings
as usually the connection thread will still be
running, so something to actually query the gui
thread will be needed
No Linters Available |
No Unit Test Coverage |
who deletes the qtimer if it times out?
can this timer stuff be shared by moving it into XdgShellInterface::Private ?
for how i did the kwin part, it must be who called it with discardTimer (this to allow kwin to receive 2 timeouts before deciding to kill the window)
most of it is in private, just its creation is mostly identical in the implementation of ping in the subclasses
for how i did the kwin part, it must be who called it with discardTimer (this to allow kwin to receive 2 timeouts before deciding to kill the window)
Ok, I see how it's meant to work but I don't understand why it's done like that.
From what I see Kwayland can call "emit q->pingTimeout ; q->discardTimer() " and your kwin code will still wait for 2 timeouts,
Otherwise it creates different behaviour depending on whether we do or don't receive a pong, and we make it very vulnerable to leak (for example if ShellClient instance is deleted with a ping open)
most of it is in private, just its creation is mostly identical in the implementation of ping in the subclasses
Yes, and I'm saying that bit could be shared as a method and called from the subclasses.
in this case only one as the second timeout will never be emitted?
what i could do, is chaning the timeout signature in pingTimeout(serial, attempt) so on kwayland-server part, it would emit timeout two times, then delte the timer by itself
most of it is in private, just its creation is mostly identical in the implementation of ping in the subclasses
Yes, and I'm saying that bit could be shared as a method and called from the subclasses.
+1