x11: Replace some warnings with debug logs

These warnings were altered due to the vast majority of cases they are
in practice harmless and just cause bug reports or red herrings due to
people seeing warnings and treating them as something that might be
relevant, while they rarely are.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4005>
This commit is contained in:
Jonas Ådahl 2024-09-09 16:25:02 +02:00 committed by Marge Bot
parent 7e9c6489ca
commit f44bf9fa40
3 changed files with 45 additions and 35 deletions

View File

@ -2587,7 +2587,8 @@ meta_x11_display_update_workspace_layout (MetaX11Display *x11_display)
vertical_layout = TRUE; vertical_layout = TRUE;
break; break;
default: default:
meta_warning ("Someone set a weird orientation in _NET_DESKTOP_LAYOUT"); meta_topic (META_DEBUG_X11,
"Someone set a weird orientation in _NET_DESKTOP_LAYOUT");
break; break;
} }
@ -2596,7 +2597,9 @@ meta_x11_display_update_workspace_layout (MetaX11Display *x11_display)
if (rows <= 0 && cols <= 0) if (rows <= 0 && cols <= 0)
{ {
meta_warning ("Columns = %d rows = %d in _NET_DESKTOP_LAYOUT makes no sense", rows, cols); meta_topic (META_DEBUG_X11,
"Columns = %d rows = %d in _NET_DESKTOP_LAYOUT makes no sense",
rows, cols);
} }
else else
{ {
@ -2628,14 +2631,16 @@ meta_x11_display_update_workspace_layout (MetaX11Display *x11_display)
starting_corner = META_DISPLAY_BOTTOMLEFT; starting_corner = META_DISPLAY_BOTTOMLEFT;
break; break;
default: default:
meta_warning ("Someone set a weird starting corner in _NET_DESKTOP_LAYOUT"); meta_topic (META_DEBUG_X11,
"Someone set a weird starting corner in _NET_DESKTOP_LAYOUT");
break; break;
} }
} }
} }
else else
{ {
meta_warning ("Someone set _NET_DESKTOP_LAYOUT to %d integers instead of 4 " meta_topic (META_DEBUG_X11,
"Someone set _NET_DESKTOP_LAYOUT to %d integers instead of 4 "
"(3 is accepted for backwards compat)", n_items); "(3 is accepted for backwards compat)", n_items);
} }

View File

@ -1083,7 +1083,7 @@ reload_update_counter (MetaWindow *window,
if (value->v.xcounter_list.n_counters == 0) if (value->v.xcounter_list.n_counters == 0)
{ {
meta_warning ("_NET_WM_SYNC_REQUEST_COUNTER is empty"); meta_topic (META_DEBUG_X11, "_NET_WM_SYNC_REQUEST_COUNTER is empty");
meta_sync_counter_set_counter (sync_counter, None, FALSE); meta_sync_counter_set_counter (sync_counter, None, FALSE);
return; return;
} }
@ -1464,7 +1464,8 @@ reload_transient_for (MetaWindow *window,
transient_for); transient_for);
if (!parent) if (!parent)
{ {
meta_warning ("Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.", meta_topic (META_DEBUG_X11,
"Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.",
transient_for, window->desc); transient_for, window->desc);
transient_for = None; transient_for = None;
} }
@ -1478,7 +1479,8 @@ reload_transient_for (MetaWindow *window,
/* We don't have to go through the parents, as per this code it is /* We don't have to go through the parents, as per this code it is
* not possible that a window has the WM_TRANSIENT_FOR set to an * not possible that a window has the WM_TRANSIENT_FOR set to an
* override-redirect window anyways */ * override-redirect window anyways */
meta_warning ("WM_TRANSIENT_FOR window %s for %s window %s is an " meta_topic (META_DEBUG_X11,
"WM_TRANSIENT_FOR window %s for %s window %s is an "
"override-redirect window and this is not correct " "override-redirect window and this is not correct "
"according to the standard, so we'll fallback to " "according to the standard, so we'll fallback to "
"the first non-override-redirect window 0x%lx.", "the first non-override-redirect window 0x%lx.",
@ -1491,11 +1493,12 @@ reload_transient_for (MetaWindow *window,
} }
else else
{ {
meta_warning ("WM_TRANSIENT_FOR window %s for %s window %s is an " meta_topic (META_DEBUG_X11,
"WM_TRANSIENT_FOR window %s for %s window %s is an "
"override-redirect window and this is not correct " "override-redirect window and this is not correct "
"according to the standard, so we'll fallback to " "according to the standard, so we'll fallback to "
"the root window.", parent->desc, window_kind, "the root window.",
window->desc); parent->desc, window_kind, window->desc);
transient_for = parent->display->x11_display->xroot; transient_for = parent->display->x11_display->xroot;
parent = NULL; parent = NULL;
} }
@ -1504,8 +1507,9 @@ reload_transient_for (MetaWindow *window,
/* Make sure there is not a loop */ /* Make sure there is not a loop */
if (check_xtransient_for_loop (window, parent)) if (check_xtransient_for_loop (window, parent))
{ {
meta_warning ("WM_TRANSIENT_FOR window 0x%lx for %s would create a " meta_topic (META_DEBUG_X11,
"loop.", transient_for, window->desc); "WM_TRANSIENT_FOR window 0x%lx for %s would create a loop.",
transient_for, window->desc);
transient_for = None; transient_for = None;
} }
} }

View File

@ -3015,10 +3015,7 @@ meta_window_move_resize_request (MetaWindow *window,
window->has_fullscreen_func && window->has_fullscreen_func &&
!meta_window_is_fullscreen (window)) !meta_window_is_fullscreen (window))
{ {
/*
meta_topic (META_DEBUG_GEOMETRY, meta_topic (META_DEBUG_GEOMETRY,
*/
meta_warning (
"Treating resize request of legacy application %s as a " "Treating resize request of legacy application %s as a "
"fullscreen request", "fullscreen request",
window->desc); window->desc);
@ -3375,9 +3372,9 @@ meta_window_x11_client_message (MetaWindow *window,
timestamp = event->xclient.data.l[0]; timestamp = event->xclient.data.l[0];
else else
{ {
meta_warning ("Receiving a NET_CLOSE_WINDOW message for %s without " meta_topic (META_DEBUG_X11,
"a timestamp! This means some buggy (outdated) " "Receiving a NET_CLOSE_WINDOW message for %s without "
"application is on the loose!", "an expected timestamp.",
window->desc); window->desc);
timestamp = meta_display_get_current_time (window->display); timestamp = meta_display_get_current_time (window->display);
} }
@ -3805,7 +3802,8 @@ meta_window_x11_client_message (MetaWindow *window,
if (timestamp == 0) if (timestamp == 0)
{ {
/* Client using older EWMH _NET_ACTIVE_WINDOW without a timestamp */ /* Client using older EWMH _NET_ACTIVE_WINDOW without a timestamp */
meta_warning ("Buggy client sent a _NET_ACTIVE_WINDOW message with a " meta_topic (META_DEBUG_X11,
"Client sent a _NET_ACTIVE_WINDOW message with an invalid"
"timestamp of 0 for %s", "timestamp of 0 for %s",
window->desc); window->desc);
timestamp = meta_display_get_current_time (display); timestamp = meta_display_get_current_time (display);
@ -4399,7 +4397,10 @@ meta_window_x11_configure_notify (MetaWindow *window,
meta_display_queue_check_fullscreen (window->display); meta_display_queue_check_fullscreen (window->display);
if (!event->override_redirect && !event->send_event) if (!event->override_redirect && !event->send_event)
meta_warning ("Unhandled change of windows override redirect status"); {
meta_topic (META_DEBUG_X11,
"Unhandled change of windows override redirect status");
}
meta_compositor_sync_window_geometry (window->display->compositor, window, FALSE); meta_compositor_sync_window_geometry (window->display->compositor, window, FALSE);
} }