[Windows Runner] Gather window again when running result

Authored by broulik on Oct 22 2019, 8:58 AM.

Description

[Windows Runner] Gather window again when running result

Since we fixed RunnerManager::teardown to actually be emitted, the runner would throw away its gathered window info and then crash in run().
I couldn't figure out what the proper API was so this is a workaround to keep it from crashing at least.
However, the runner also didn't check whether the window was actually still valid by the time run() was called,
so querying for the window again once it is called and checking validity is a good thing either way imho.
In the future, this probably should be ported to using libtaskmanager :)

BUG: 412386
FIXED-IN: 5.17.1

Differential Revision: https://phabricator.kde.org/D24849

Details