aboutsummaryrefslogtreecommitdiff
path: root/src/settings-daemon.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings-daemon.vala')
-rw-r--r--src/settings-daemon.vala28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/settings-daemon.vala b/src/settings-daemon.vala
index 88bf698..be34e9c 100644
--- a/src/settings-daemon.vala
+++ b/src/settings-daemon.vala
@@ -225,12 +225,36 @@ public class ScreenSaverInterface : Object
idle_monitor.remove_watch (idle_watch);
idle_watch = 0;
if (value)
- idle_monitor.add_user_active_watch (() => set_active (false));
+ {
+ idle_monitor.add_user_active_watch (() =>
+ {
+ try
+ {
+ set_active (false);
+ }
+ catch (Error pError)
+ {
+ error ("Panic: Screensaver activation failed: %s", pError.message);
+ }
+ });
+ }
else
{
var timeout = AGSettings.get_integer (AGSettings.KEY_IDLE_TIMEOUT);
if (timeout > 0)
- idle_watch = idle_monitor.add_idle_watch (timeout * 1000, () => set_active (true));
+ {
+ idle_watch = idle_monitor.add_idle_watch (timeout * 1000, () =>
+ {
+ try
+ {
+ set_active (true);
+ }
+ catch (Error pError)
+ {
+ error ("Panic: Screensaver activation failed: %s", pError.message);
+ }
+ });
+ }
}
}