loginManager: Get user proxy for UID

Using the user object at `/org/freedesktop/login1/User/self` is
convenient, but has the caveat that login1 does not emit the
`PropertiesChanged` signal for the object.

That is indeed logical, as for signal emissions there is no
sender that can be used to resolve `self`.

The new TimeLimitsManager depends on change notifications for
user properties, so stop using the `self` shorthand and instead
create the User proxy for the user's UID.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8185
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3636>
This commit is contained in:
Florian Müllner
2025-02-13 02:51:14 +01:00
committed by Marge Bot
parent a719b7039e
commit 5115236703
2 changed files with 22 additions and 7 deletions

View File

@@ -17,6 +17,10 @@
<arg type="s" direction="in"/>
<arg type="o" direction="out"/>
</method>
<method name="GetUser">
<arg type="u" direction="in"/>
<arg type="o" direction="out"/>
</method>
<method name="ListSessions">
<arg name="sessions" type="a(susso)" direction="out"/>
</method>