* src/xterm.c (x_display_set_last_user_time): Don't change the
user time property if nothing actually changed.
bool send_event)
{
#ifndef USE_GTK
- struct frame *focus_frame = dpyinfo->x_focus_frame;
+ struct frame *focus_frame;
+ Time old_time;
+
+ focus_frame = dpyinfo->x_focus_frame;
+ old_time = dpyinfo->last_user_time;
#endif
#ifdef ENABLE_CHECKING
dpyinfo->last_user_time = time;
#ifndef USE_GTK
- if (focus_frame)
+ /* Don't waste bandwidth if the time hasn't actually changed. */
+ if (focus_frame && old_time != dpyinfo->last_user_time)
{
+ time = dpyinfo->last_user_time;
+
while (FRAME_PARENT_FRAME (focus_frame))
focus_frame = FRAME_PARENT_FRAME (focus_frame);