Commit 7f9fba8b authored by Bastien Nocera's avatar Bastien Nocera
Browse files

idle-monitor: Reset the alarm so it can be triggered again says:

[... If] the delta is 0 and test-type is PositiveComparison
or NegativeComparison, no change is made to value and the alarm
state is changed to Inactive before the event is generated.

But we want to receive to receive events about the idleness/business
of the counter, so reset the alarm when the alarm is triggered.
parent bb3628db
......@@ -143,11 +143,12 @@ handle_alarm_notify_event (GnomeIdleMonitor *monitor,
if (alarm_event->alarm == monitor->priv->xalarm_reset) {
g_signal_emit (monitor, signals[BECAME_ACTIVE], 0);
} else {
GnomeIdleMonitorWatch *watch = find_watch_for_alarm (monitor, alarm_event->alarm);
GnomeIdleMonitorWatch *watch;
XSyncAlarmAttributes attr;
if (watch == NULL) {
watch = find_watch_for_alarm (monitor, alarm_event->alarm);
if (watch == NULL)
g_signal_emit (monitor, signals[TRIGGERED_IDLE], 0, watch->id);
......@@ -156,6 +157,10 @@ handle_alarm_notify_event (GnomeIdleMonitor *monitor,
/* Reset the alarm so it can be triggered again */ = TRUE;
XSyncChangeAlarm (watch->display, watch->xalarm, XSyncCAEvents, &attr);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment