udev: Use current tags when looking for preferred primary devices
In some use cases there is a need to dynamically change the preferred primary GPU, or get rid of the preference altogether. This is currently not possible due to a change in udev introduced by systemd v247. This version made the tags "sticky", meaning there is no way to remove them once attached. When a tag gets removed, only the CURRENT_TAGS property reflects that change, the removed tag will remain in the TAGS property. This also bumps libgudev version to 238, since that version introduces a function, which we need to get the current tags. Related: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1562 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4055>
This commit is contained in:
parent
36f1a38c3b
commit
57812546b9
2 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,7 @@ libei_req = '>= 1.0.901'
|
|||
|
||||
# optional version requirements
|
||||
udev_req = '>= 228'
|
||||
gudev_req = '>= 232'
|
||||
gudev_req = '>= 238'
|
||||
|
||||
# wayland version requirements
|
||||
wayland_server_req = '>= 1.23'
|
||||
|
|
|
@ -124,9 +124,9 @@ meta_is_udev_test_device (GUdevDevice *device)
|
|||
gboolean
|
||||
meta_is_udev_device_preferred_primary (GUdevDevice *device)
|
||||
{
|
||||
const char * const * tags;
|
||||
const char * const *tags;
|
||||
|
||||
tags = g_udev_device_get_tags (device);
|
||||
tags = g_udev_device_get_current_tags (device);
|
||||
if (!tags)
|
||||
return FALSE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue