My KWIN fork where I work on features like per-output virtual desktops
Find a file
David Edmundson 395cc4f945 Manage active selection as active DataSource than DataDevice
Summary:
A DataDevice will have zero or one active DataSource as the seclection.

In the existing code we track the current data device then update it to
the newest data device
when the source inside a data device changes.

If we store the active data source inside Seat instead of the device
everything becomes
somewhat simpler and safer.

An entire unit test vanishes as that case of an externally set
DataDevice with no source
can no longer happen.

There's also a lot of duplication that's been merged in this patch so we
have one path.

There are some technical behavioural changes in particular we do cleanup
when the
source vanishes rather than the data device, but if anything that seems
safer and more correct.

It's a precursor for introducing an abstraction class round the source
without needing to meddle
with too much code.

Test Plan: Relevant unit tests passed, ran with it for a while with no
issue.

Reviewers: #kwin

Differential Revision: https://phabricator.kde.org/D29328
2020-05-26 09:31:03 +01:00
src/wayland Manage active selection as active DataSource than DataDevice 2020-05-26 09:31:03 +01:00