session: Add sound events for login and logout#330
Conversation
|
I've had broken libcanberra for quite some time, system sounds can be played in mate-volume-control but don't actually work if
turned on, so I've got no way to test this
|
Adds optional libcanberra support to play desktop-login and desktop-logout sound events during session start and end. Sound playback is controlled through the system sound theme configuration. Fixes #328
lukefromdc
left a comment
There was a problem hiding this comment.
While system sounds do not work on my setup, I do have libcanberra installed and a build of this finished with no problems.
The config log showed
Libcanberra support: yes
So that part I know works. Hoping we can get another review but if it works for you I am OK with merging. The code change is simple enough.
|
I thank you so much for the implemetation. I understand it was cosmetic mostly, but it was a change that's well-deserved for such an amazing DE. Keep up the great work ✨ |
| #ifdef HAVE_LIBCANBERRA | ||
| ca_context_play (ca_gtk_context_get (), 0, | ||
| CA_PROP_EVENT_ID, "desktop-logout", | ||
| CA_PROP_EVENT_DESCRIPTION, "Session logout", | ||
| NULL); | ||
| #endif |
There was a problem hiding this comment.
Is that really the right place for this? I admittedly didn't test this, but it looks like it should rather be in GSM_MANAGER_PHASE_END_SESSION rather than GSM_MANAGER_PHASE_QUERY_END_SESSION, shouldn't it? Or is it too late then?
The thing I'm mostly "afraid" of is what happens if some apps inhibit session close?
There was a problem hiding this comment.
Oh crap, you're right. Like if an unsaved document prevents the session from ending the sound would end up playing even if the user decides to cancel the logout at that point. I'll move that.
Adds optional libcanberra support to play desktop-login and desktop-logout sound events during session start and end. Sound playback is controlled through the system sound theme configuration.
Fixes #328