After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 657703 - Issues with userMenu's session management
Issues with userMenu's session management
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 658165 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-08-30 13:14 UTC by Guillaume Desmottes
Modified: 2011-09-08 22:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
user-menu: Keep track of current presence (1.52 KB, patch)
2011-09-02 12:43 UTC, Florian Müllner
committed Details | Review

Description Guillaume Desmottes 2011-08-30 13:14:41 UTC
Empathy master does no longer do any session management when using the Shell (bug #656631).

While testing this feature (locking/unlocking the screen) I noticed some issues in the way Shell's is handling presence.

a) The status passed to tp_account_manager_set_all_requested_presences() is wrong (bug #657696).

b) When locking the screen, the session state goes to idle which is fine. The Shell changes the status of all IM accounts to XA. But during the process _IMStatusChanged() is called with 'available' as a presence (not sure why, maybe because the accounts don't all go away immediatelly) so the Shell sets the session state back to available --> IM accounts are not XA as expected.

c) If I remove the call in _IMStatusChanged setting the session status to available, the accounts are XA as expected. But when I unlock the screen they stay XA instead of going back as available.
Comment 1 Florian Müllner 2011-09-02 12:43:21 UTC
Created attachment 195476 [details] [review]
user-menu: Keep track of current presence

We keep track of presence changes by connecting to the
Tp.AccountManager:most-available-presence-changed signal.
However, if multiple accounts are in use, telepathy may
lie to us and emit the signal even when the most available
presence is unchanged.
Work around this by keeping track of the current presence
ourselves.

(In reply to comment #0)
> Empathy master does no longer do any session management when using the Shell
> (bug #656631).

Yay!


> b) When locking the screen, the session state goes to idle which is fine. The
> Shell changes the status of all IM accounts to XA. But during the process
> _IMStatusChanged() is called with 'available' as a presence (not sure why,
> maybe because the accounts don't all go away immediatelly) so the Shell sets
> the session state back to available --> IM accounts are not XA as expected.

Yeah, I can only reproduce the issue with multiple accounts. Quick testing suggests that the attached patch fixes the issue, though if that is indeed the case, the issue is arguably a telepathy issue (for emitting a 'changed' signal when there was no actual change; if that behavior is expected, at least the signal's documentation should be updated to mention it :-)
Comment 2 Guillaume Desmottes 2011-09-02 12:57:06 UTC
You're right, something is weird with this signal. I'll do some digging.
Comment 3 Guillaume Desmottes 2011-09-02 13:07:24 UTC
Actually this signal could be fired if only, say, the message changed, so you still need to check if the presence actually changed; so your patch is good.
Comment 4 Florian Müllner 2011-09-02 16:14:16 UTC
Attachment 195476 [details] pushed as 8adc193 - user-menu: Keep track of current presence
Comment 5 Jan Alexander Steffens (heftig) 2011-09-08 22:36:44 UTC
*** Bug 658165 has been marked as a duplicate of this bug. ***