Commit graph

11 commits

Author SHA1 Message Date
Vlad Zahorodnii
8d9e47ee22 platforms/drm: Introduce KWIN_DRM_DEVICES
This allows to instruct kwin what drm devices must be used explicitly.

BUG: 435467
2021-05-01 12:14:34 +00:00
Vlad Zahorodnii
54a034b7cf platforms/drm: Use dev nums to find gpus
This way we don't need to convert strings to ints every time
udev_device_get_sysnum() is called.
2021-04-29 04:58:46 +00:00
Xaver Hugl
9cd046f206 platforms/drm: add GPU hotplug support 2021-04-28 18:57:47 +02:00
Aleix Pol
0b14af5624 udev: Do not return a mysterious vector with just a null pointer
When getting the vector, it requires us to check both if it's not empty
but also that it's not null. I haven't seen it but we were not doing
this check.

Just return an empty vector when there's no devices instead.
2021-04-27 15:14:06 +02:00
Aleix Pol
0e433cb83a udev: remove duplicated code
Let UdevDevice offer the method we need for sorting instead of just half
of it.
Always sort Udev enumerations, since the alternative is to sort it every
time it's called otherwise.
2021-04-27 15:12:26 +02:00
Ömer Fadıl Usta
94f558356b Add missing include for errno 2021-04-16 20:32:50 +00:00
Aleix Pol
ca1e4a255a udev: never construct UdevDevices with a null device
It allows to trust the device we have as it's referenced. We were
already checking for pointer validity when getting them so it still
makes sense.
2021-04-15 15:00:52 +00:00
Aleix Pol
bec580f3c5 udev: Add a method to get all properties of an UdevDevice
It's useful for debugging.
2021-04-15 15:00:52 +00:00
Aleix Pol
d216e74cfc udev@drm: Acknowledge that udev_monitor_receive_device can return NULL
Do not build UDevDevice unless the device itself is valid.
2021-04-15 15:00:52 +00:00
Vlad Zahorodnii
ade861d6de Refactor session code
At the moment, the session code is far from being extensible. If we
decide to add support for libseatd, it will be a challenging task with
the current design of session management code. The goal of this
refactoring is to fix that.

Another motivation behind this change is to prepare session related code
for upstreaming to kwayland-server where it belongs.
2021-03-23 08:01:19 +00:00
Vlad Zahorodnii
93e0265e4e Move source code to src/ directory
Once in a while, we receive complaints from other fellow KDE developers
about the file organization of kwin. This change addresses some of those
complaints by moving all of source code in a separate directory, src/,
thus making the project structure more traditional. Things such as tests
are kept in their own toplevel directories.

This change may wreak havoc on merge requests that add new files to kwin,
but if a patch modifies an already existing file, git should be smart
enough to figure out that the file has been relocated.

We may potentially split the src/ directory further to make navigating
the source code easier, but hopefully this is good enough already.
2021-02-10 15:31:43 +00:00
Renamed from udev.cpp (Browse further)