+void client_update_user_time(ObClient *self, gboolean new_event)
+{
+ guint32 time;
+
+ if (PROP_GET32(self->window, net_wm_user_time, cardinal, &time)) {
+ self->user_time = time;
+ /* we set this every time, not just when it grows, because in practice
+ sometimes time goes backwards! (ntpdate.. yay....) so.. if it goes
+ backward we don't want all windows to stop focusing. we'll just
+ assume noone is setting times older than the last one, cuz that
+ would be pretty stupid anyways
+ However! This is called when a window is mapped to get its user time
+ but it's an old number, it's not changing it from new user
+ interaction, so in that case, don't change the last user time.
+ */
+ if (new_event)
+ client_last_user_time = time;
+ }
+}
+