File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -539,6 +539,14 @@ function start() {
539539 }
540540 } ) ;
541541
542+ if ( ! global . session_running || Meta . is_wayland_compositor ( ) ) {
543+ // If the session is *not* already running, clear the internal locked
544+ // state. This is used in x11 sessions to restore the screensaver after
545+ // cinnamon restarts. Wayland doesn't support restarts (yet) so it should
546+ // always be false.
547+ global . settings . set_boolean ( "session-locked-state" , false ) ;
548+ }
549+
542550 _screensaverSettings = new Gio . Settings ( { schema_id : 'org.cinnamon.desktop.screensaver' } ) ;
543551
544552 // The internal screensaver is the only option for wayland sessions. X11 sessions can use either
Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ var ScreenShield = GObject.registerClass({
223223
224224 let locked = newState === State . LOCKED || newState === State . UNLOCKING ;
225225 let wasLocked = oldState === State . LOCKED || oldState === State . UNLOCKING ;
226- if ( locked !== wasLocked ) {
226+ if ( locked !== wasLocked && ! Metа . is_wayland_compositor ( ) ) {
227227 global . settings . set_boolean ( 'session-locked-state' , locked ) ;
228228 }
229229
You can’t perform that action at this time.
0 commit comments