midori-display: Handle situations where the Xserver has died and xprintidle does not produce output.
This commit is contained in:
parent
ed600a8666
commit
dccbae23c1
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue