shell: Disarm the screensaver timeout timer on terminate_screensaver()

The timer was left running after the screensaver was terminated. When
it triggered, a fade out that would in turn cause the screen to be
locked was started. Since that could happen without the compositor
emitting the idle signal, there would be no wake signal to make the
shell show the lock screen, so the system was left unresponsive
until the idle signal actually triggered.

https://bugs.freedesktop.org/show_bug.cgi?id=70923
This commit is contained in:
Ander Conselvan de Oliveira 2014-04-10 14:49:35 +03:00 committed by Kristian Høgsberg
parent b4a91708e3
commit 4e20e9b847

View file

@ -3741,6 +3741,12 @@ terminate_screensaver(struct desktop_shell *shell)
if (shell->screensaver.process.pid == 0)
return;
/* Disarm the screensaver timer, otherwise it may fire when the
* compositor is not in the idle state. In that case, the screen will
* be locked, but the wake_signal won't fire on user input, making the
* system unresponsive. */
wl_event_source_timer_update(shell->screensaver.timer, 0);
kill(shell->screensaver.process.pid, SIGTERM);
}