display: Replace X11 timestamp checking warnings with debug logs

It's cases where some client is at fault, so don't print warnings in the
journal unless asked to.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4005>
This commit is contained in:
Jonas Ådahl 2024-12-30 16:04:18 +01:00 committed by Marge Bot
parent a68b6dae6a
commit e0b74fee52

View File

@ -2447,11 +2447,12 @@ meta_display_sanity_check_timestamps (MetaDisplay *display,
{ {
if (XSERVER_TIME_IS_BEFORE (timestamp, display->last_focus_time)) if (XSERVER_TIME_IS_BEFORE (timestamp, display->last_focus_time))
{ {
meta_warning ("last_focus_time (%u) is greater than comparison " meta_topic (META_DEBUG_X11,
"timestamp (%u). This most likely represents a buggy " "last_focus_time (%u) is greater than comparison "
"client sending inaccurate timestamps in messages such as " "timestamp (%u). This most likely represents a buggy "
"_NET_ACTIVE_WINDOW. Trying to work around...", "client sending inaccurate timestamps in messages such as "
display->last_focus_time, timestamp); "_NET_ACTIVE_WINDOW. Trying to work around...",
display->last_focus_time, timestamp);
display->last_focus_time = timestamp; display->last_focus_time = timestamp;
} }
if (XSERVER_TIME_IS_BEFORE (timestamp, display->last_user_time)) if (XSERVER_TIME_IS_BEFORE (timestamp, display->last_user_time))
@ -2459,11 +2460,12 @@ meta_display_sanity_check_timestamps (MetaDisplay *display,
GSList *windows; GSList *windows;
GSList *tmp; GSList *tmp;
meta_warning ("last_user_time (%u) is greater than comparison " meta_topic (META_DEBUG_X11,
"timestamp (%u). This most likely represents a buggy " "last_user_time (%u) is greater than comparison "
"client sending inaccurate timestamps in messages such as " "timestamp (%u). This most likely represents a buggy "
"_NET_ACTIVE_WINDOW. Trying to work around...", "client sending inaccurate timestamps in messages such as "
display->last_user_time, timestamp); "_NET_ACTIVE_WINDOW. Trying to work around...",
display->last_user_time, timestamp);
display->last_user_time = timestamp; display->last_user_time = timestamp;
windows = meta_display_list_windows (display, META_LIST_DEFAULT); windows = meta_display_list_windows (display, META_LIST_DEFAULT);
@ -2474,9 +2476,10 @@ meta_display_sanity_check_timestamps (MetaDisplay *display,
if (XSERVER_TIME_IS_BEFORE (timestamp, window->net_wm_user_time)) if (XSERVER_TIME_IS_BEFORE (timestamp, window->net_wm_user_time))
{ {
meta_warning ("%s appears to be one of the offending windows " meta_topic (META_DEBUG_X11,
"with a timestamp of %u. Working around...", "%s appears to be one of the offending windows "
window->desc, window->net_wm_user_time); "with a timestamp of %u. Working around...",
window->desc, window->net_wm_user_time);
window->net_wm_user_time_set = FALSE; window->net_wm_user_time_set = FALSE;
meta_window_set_user_time (window, timestamp); meta_window_set_user_time (window, timestamp);
} }