summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Taylor <rob.taylor@codethink.co.uk>2007-09-23 18:14:29 +0200
committerRob Taylor <rob.taylor@codethink.co.uk>2007-09-23 18:14:29 +0200
commitb95316f6a8a7e30d009851ff7babb65deea427f5 (patch)
treec7f5e2f8dae989b23da57be3cbc1d56d05fef0aa
parentf3e2735d7d2a1dcc9a6cff9cdadba79446c5dd7d (diff)
use int64_to_xsyncvalue and xsyncvalue_to_int64 rather than XSyncValueAdd and friends.
Removes idletime_xsync_value_add_one, replaced with int64 manipulation.
-rw-r--r--libidletime/libidletime.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/libidletime/libidletime.c b/libidletime/libidletime.c
index feecef1..1c95508 100644
--- a/libidletime/libidletime.c
+++ b/libidletime/libidletime.c
@@ -159,20 +159,6 @@ idletime_timeout (LibIdletime *idletime, LibIdletimeAlarm *alarm)
}
/**
- * idletime_xsync_value_add_one:
- *
- * Just adds one to a XSyncValue. I love X.
- */
-static void
-idletime_xsync_value_add_one (XSyncValue *from, XSyncValue *to)
-{
- int overflow;
- XSyncValue add;
- XSyncIntToValue (&add, -1);
- XSyncValueAdd (to, *from, add, &overflow);
-}
-
-/**
* idletime_alarm_find_id:
*/
static LibIdletimeAlarm *
@@ -202,7 +188,7 @@ idletime_x_set_reset (LibIdletime *idletime, XSyncAlarmNotifyEvent *alarm_event)
if (idletime->priv->reset_set == FALSE) {
/* don't match on the current value because
* XSyncNegativeComparison means less or equal. */
- idletime_xsync_value_add_one (&alarm_event->counter_value, &alarm->timeout);
+ alarm->timeout = int64_to_xsyncvalue (xsyncvalue_to_int64 (&alarm_event->counter_value) - 1LL);
/* set the reset alarm to fire the next time
* idletime->priv->idle_counter < the current counter value */