diff options
Diffstat (limited to 'src/backends/meta-idle-monitor.c')
-rw-r--r-- | src/backends/meta-idle-monitor.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/backends/meta-idle-monitor.c b/src/backends/meta-idle-monitor.c index 2ff1602e7..4304db142 100644 --- a/src/backends/meta-idle-monitor.c +++ b/src/backends/meta-idle-monitor.c @@ -64,11 +64,7 @@ meta_idle_monitor_watch_fire (MetaIdleMonitorWatch *watch) monitor = watch->monitor; g_object_ref (monitor); - if (watch->idle_source_id) - { - g_source_remove (watch->idle_source_id); - watch->idle_source_id = 0; - } + g_clear_handle_id (&watch->idle_source_id, g_source_remove); id = watch->id; is_user_active_watch = (watch->timeout_msec == 0); @@ -161,11 +157,7 @@ free_watch (gpointer data) g_object_ref (monitor); - if (watch->idle_source_id) - { - g_source_remove (watch->idle_source_id); - watch->idle_source_id = 0; - } + g_clear_handle_id (&watch->idle_source_id, g_source_remove); if (watch->notify != NULL) watch->notify (watch->user_data); |