[x11] Only update cached last event time if we have a real timestamp.

Ignore the timestamp if it is set to CurrentTime (e.g., when the last event
did not carry a timestamp).
This commit is contained in:
Tomas Frydrych 2009-02-18 16:54:18 +00:00
parent d2fe1fda31
commit c0672b6683

View File

@ -244,7 +244,8 @@ update_last_event_time (ClutterBackendX11 *backend_x11,
* time, or if it is at least 30 seconds earlier - in case the system
* clock was changed
*/
if (current_time > last_time || (last_time - current_time > (30 * 1000)))
if ((current_time != CurrentTime) &&
(current_time > last_time || (last_time - current_time > (30 * 1000))))
backend_x11->last_event_time = current_time;
}