summaryrefslogtreecommitdiff
path: root/Xext
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-10-16 09:36:01 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-10-18 16:44:32 +1000
commitefc1035ca958f2c9d266338a308518a0834b1773 (patch)
tree939f3d0e4bce891371d9d0f150639f610fcbe5cc /Xext
parentb7c9bd9cf276e92a73be57ff2ed32b47a80f13fb (diff)
dix: provide accessor methods for the last device event time
And now that we have the accessors, localize it. No functional changes, just preparing for a future change. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'Xext')
-rw-r--r--Xext/saver.c6
-rw-r--r--Xext/sync.c2
2 files changed, 3 insertions, 5 deletions
diff --git a/Xext/saver.c b/Xext/saver.c
index fe81bc4d7..e06f40837 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -392,9 +392,7 @@ ScreenSaverFreeSuspend(pointer value, XID id)
DeviceIntPtr dev;
UpdateCurrentTimeIf();
nt_list_for_each_entry(dev, inputInfo.devices, next)
- lastDeviceEventTime[dev->id] = currentTime;
- lastDeviceEventTime[XIAllDevices] = currentTime;
- lastDeviceEventTime[XIAllMasterDevices] = currentTime;
+ NoticeTime(dev, currentTime);
SetScreenSaverTimer();
}
}
@@ -681,7 +679,7 @@ ProcScreenSaverQueryInfo(ClientPtr client)
pPriv = GetScreenPrivate(pDraw->pScreen);
UpdateCurrentTime();
- lastInput = GetTimeInMillis() - lastDeviceEventTime[XIAllDevices].milliseconds;
+ lastInput = GetTimeInMillis() - LastEventTime(XIAllDevices).milliseconds;
rep = (xScreenSaverQueryInfoReply) {
.type = X_Reply,
diff --git a/Xext/sync.c b/Xext/sync.c
index f8eb02a60..ed891b169 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -2605,7 +2605,7 @@ IdleTimeQueryValue(pointer pCounter, CARD64 * pValue_return)
}
else
deviceid = XIAllDevices;
- idle = GetTimeInMillis() - lastDeviceEventTime[deviceid].milliseconds;
+ idle = GetTimeInMillis() - LastEventTime(deviceid).milliseconds;
XSyncIntsToValue(pValue_return, idle, 0);
}