midori-display: Handle situations where the Xserver has died and xprintidle does not produce output.

This commit is contained in:
Mike Gabriel 2017-03-21 19:36:16 +01:00
parent ed600a8666
commit dccbae23c1
1 changed files with 1 additions and 1 deletions

View File

@ -234,7 +234,7 @@ function midori_loop {
(
while [ -e "$session_lock" ]; do
sleep 1
if [ `xprintidle` -gt $(($INACTIVITY_INTERVAL*1000)) ]; then
if [ `xprintidle 2>/dev/null || echo 0` -gt $(($INACTIVITY_INTERVAL*1000)) ]; then
echo -n "RESTART" > $midori_lock
$OUTPUT "INFO: Triggering browser restart, too much idling around..."
# reset X11 idle counter by some harmless key event