Make meta_* logging utilities not require line break

Unlike g_* logging utilities, the meta_* counterparts behave like odd
printf() functions. Lets change that so they fit better into how logging
is done everywhere else.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1466
This commit is contained in:
Jonas Ådahl
2020-10-02 17:47:22 +02:00
parent dbe44f3a83
commit 313e3e771c
50 changed files with 596 additions and 579 deletions

View File

@@ -1146,7 +1146,7 @@ meta_display_for_x_display (Display *xdisplay)
if (the_display->x11_display->xdisplay == xdisplay)
return the_display;
meta_warning ("Could not find display for X display %p, probably going to crash\n",
meta_warning ("Could not find display for X display %p, probably going to crash",
xdisplay);
return NULL;
@@ -1330,7 +1330,7 @@ window_raise_with_delay_callback (void *data)
meta_window_raise (window);
else
meta_topic (META_DEBUG_FOCUS,
"Pointer not inside window, not raising %s\n",
"Pointer not inside window, not raising %s",
window->desc);
}
@@ -1342,7 +1342,7 @@ meta_display_queue_autoraise_callback (MetaDisplay *display,
MetaWindow *window)
{
meta_topic (META_DEBUG_FOCUS,
"Queuing an autoraise timeout for %s with delay %d\n",
"Queuing an autoraise timeout for %s with delay %d",
window->desc,
meta_prefs_get_auto_raise_delay ());
@@ -1399,7 +1399,7 @@ meta_display_update_focus_window (MetaDisplay *display,
MetaWindow *previous;
meta_topic (META_DEBUG_FOCUS,
"%s is now the previous focus window due to being focused out or unmapped\n",
"%s is now the previous focus window due to being focused out or unmapped",
display->focus_window->desc);
/* Make sure that signals handlers invoked by
@@ -1416,12 +1416,12 @@ meta_display_update_focus_window (MetaDisplay *display,
if (display->focus_window)
{
meta_topic (META_DEBUG_FOCUS, "* Focus --> %s\n",
meta_topic (META_DEBUG_FOCUS, "* Focus --> %s",
display->focus_window->desc);
meta_window_set_focused_internal (display->focus_window, TRUE);
}
else
meta_topic (META_DEBUG_FOCUS, "* Focus --> NULL\n");
meta_topic (META_DEBUG_FOCUS, "* Focus --> NULL");
if (meta_is_wayland_compositor ())
meta_display_sync_wayland_input_focus (display);
@@ -1815,13 +1815,13 @@ meta_display_begin_grab_op (MetaDisplay *display,
g_assert (window != NULL);
meta_topic (META_DEBUG_WINDOW_OPS,
"Doing grab op %u on window %s button %d pointer already grabbed: %d pointer pos %d,%d\n",
"Doing grab op %u on window %s button %d pointer already grabbed: %d pointer pos %d,%d",
op, window->desc, button, pointer_already_grabbed,
root_x, root_y);
if (display->grab_op != META_GRAB_OP_NONE)
{
meta_warning ("Attempt to perform window operation %u on window %s when operation %u on %s already in effect\n",
meta_warning ("Attempt to perform window operation %u on window %s when operation %u on %s already in effect",
op, window->desc, display->grab_op,
display->grab_window ? display->grab_window->desc : "none");
return FALSE;
@@ -1874,7 +1874,7 @@ meta_display_begin_grab_op (MetaDisplay *display,
if (!display->grab_have_pointer && !meta_grab_op_is_keyboard (op))
{
meta_topic (META_DEBUG_WINDOW_OPS, "XIGrabDevice() failed\n");
meta_topic (META_DEBUG_WINDOW_OPS, "XIGrabDevice() failed");
return FALSE;
}
@@ -1885,7 +1885,7 @@ meta_display_begin_grab_op (MetaDisplay *display,
if (!display->grab_have_keyboard)
{
meta_topic (META_DEBUG_WINDOW_OPS, "grabbing all keys failed, ungrabbing pointer\n");
meta_topic (META_DEBUG_WINDOW_OPS, "grabbing all keys failed, ungrabbing pointer");
meta_backend_ungrab_device (backend, META_VIRTUAL_CORE_POINTER_ID, timestamp);
display->grab_have_pointer = FALSE;
return FALSE;
@@ -1911,7 +1911,7 @@ meta_display_begin_grab_op (MetaDisplay *display,
g_clear_handle_id (&display->grab_resize_timeout_id, g_source_remove);
meta_topic (META_DEBUG_WINDOW_OPS,
"Grab op %u on window %s successful\n",
"Grab op %u on window %s successful",
display->grab_op, window ? window->desc : "(null)");
meta_window_get_frame_rect (display->grab_window,
@@ -1941,7 +1941,7 @@ meta_display_end_grab_op (MetaDisplay *display,
MetaGrabOp grab_op = display->grab_op;
meta_topic (META_DEBUG_WINDOW_OPS,
"Ending grab op %u at time %u\n", grab_op, timestamp);
"Ending grab op %u at time %u", grab_op, timestamp);
if (display->event_route == META_EVENT_ROUTE_NORMAL ||
display->event_route == META_EVENT_ROUTE_COMPOSITOR_GRAB)
@@ -1981,7 +1981,7 @@ meta_display_end_grab_op (MetaDisplay *display,
if (display->grab_have_keyboard)
{
meta_topic (META_DEBUG_WINDOW_OPS,
"Ungrabbing all keys timestamp %u\n", timestamp);
"Ungrabbing all keys timestamp %u", timestamp);
meta_window_ungrab_all_keys (grab_window, timestamp);
}
@@ -2125,7 +2125,7 @@ meta_display_ping_timeout (gpointer data)
ping_data->ping_timeout_id = 0;
meta_topic (META_DEBUG_PING,
"Ping %u on window %s timed out\n",
"Ping %u on window %s timed out",
ping_data->serial, ping_data->window->desc);
display->pending_pings = g_slist_remove (display->pending_pings, ping_data);
@@ -2165,7 +2165,7 @@ meta_display_ping_window (MetaWindow *window,
if (serial == 0)
{
meta_warning ("Tried to ping window %s with a bad serial! Not allowed.\n",
meta_warning ("Tried to ping window %s with a bad serial! Not allowed.",
window->desc);
return;
}
@@ -2180,7 +2180,7 @@ meta_display_ping_window (MetaWindow *window,
if (window == ping_data->window)
{
meta_topic (META_DEBUG_PING,
"Window %s already is being pinged with serial %u\n",
"Window %s already is being pinged with serial %u",
window->desc, ping_data->serial);
return;
}
@@ -2188,7 +2188,7 @@ meta_display_ping_window (MetaWindow *window,
if (serial == ping_data->serial)
{
meta_warning ("Ping serial %u was reused for window %s, "
"previous use was for window %s.\n",
"previous use was for window %s.",
serial, window->desc, ping_data->window->desc);
return;
}
@@ -2206,7 +2206,7 @@ meta_display_ping_window (MetaWindow *window,
display->pending_pings = g_slist_prepend (display->pending_pings, ping_data);
meta_topic (META_DEBUG_PING,
"Sending ping with serial %u to window %s\n",
"Sending ping with serial %u to window %s",
serial, window->desc);
META_WINDOW_GET_CLASS (window)->ping (window, serial);
@@ -2227,7 +2227,7 @@ meta_display_pong_for_serial (MetaDisplay *display,
{
GSList *tmp;
meta_topic (META_DEBUG_PING, "Received a pong with serial %u\n", serial);
meta_topic (META_DEBUG_PING, "Received a pong with serial %u", serial);
for (tmp = display->pending_pings; tmp; tmp = tmp->next)
{
@@ -2236,7 +2236,7 @@ meta_display_pong_for_serial (MetaDisplay *display,
if (serial == ping_data->serial)
{
meta_topic (META_DEBUG_PING,
"Matching ping found for pong %u\n",
"Matching ping found for pong %u",
ping_data->serial);
/* Remove the ping data from the list */
@@ -2686,7 +2686,7 @@ meta_display_sanity_check_timestamps (MetaDisplay *display,
meta_warning ("last_focus_time (%u) is greater than comparison "
"timestamp (%u). This most likely represents a buggy "
"client sending inaccurate timestamps in messages such as "
"_NET_ACTIVE_WINDOW. Trying to work around...\n",
"_NET_ACTIVE_WINDOW. Trying to work around...",
display->last_focus_time, timestamp);
display->last_focus_time = timestamp;
}
@@ -2698,7 +2698,7 @@ meta_display_sanity_check_timestamps (MetaDisplay *display,
meta_warning ("last_user_time (%u) is greater than comparison "
"timestamp (%u). This most likely represents a buggy "
"client sending inaccurate timestamps in messages such as "
"_NET_ACTIVE_WINDOW. Trying to work around...\n",
"_NET_ACTIVE_WINDOW. Trying to work around...",
display->last_user_time, timestamp);
display->last_user_time = timestamp;
@@ -2711,7 +2711,7 @@ meta_display_sanity_check_timestamps (MetaDisplay *display,
if (XSERVER_TIME_IS_BEFORE (timestamp, window->net_wm_user_time))
{
meta_warning ("%s appears to be one of the offending windows "
"with a timestamp of %u. Working around...\n",
"with a timestamp of %u. Working around...",
window->desc, window->net_wm_user_time);
meta_window_set_user_time (window, timestamp);
}
@@ -3292,7 +3292,7 @@ meta_display_apply_startup_properties (MetaDisplay *display,
startup_id = meta_window_get_startup_id (window);
meta_topic (META_DEBUG_STARTUP,
"Applying startup props to %s id \"%s\"\n",
"Applying startup props to %s id \"%s\"",
window->desc,
startup_id ? startup_id : "(none)");
@@ -3311,7 +3311,7 @@ meta_display_apply_startup_properties (MetaDisplay *display,
startup_id = window->startup_id;
meta_topic (META_DEBUG_STARTUP,
"Ending legacy sequence %s due to window %s\n",
"Ending legacy sequence %s due to window %s",
meta_startup_sequence_get_id (sequence),
window->desc);
@@ -3339,7 +3339,7 @@ meta_display_apply_startup_properties (MetaDisplay *display,
gboolean changed_something = FALSE;
meta_topic (META_DEBUG_STARTUP,
"Found startup sequence for window %s ID \"%s\"\n",
"Found startup sequence for window %s ID \"%s\"",
window->desc, startup_id);
if (!window->initial_workspace_set)
@@ -3348,7 +3348,7 @@ meta_display_apply_startup_properties (MetaDisplay *display,
if (space >= 0)
{
meta_topic (META_DEBUG_STARTUP,
"Setting initial window workspace to %d based on startup info\n",
"Setting initial window workspace to %d based on startup info",
space);
window->initial_workspace_set = TRUE;
@@ -3361,7 +3361,7 @@ meta_display_apply_startup_properties (MetaDisplay *display,
{
guint32 timestamp = meta_startup_sequence_get_timestamp (sequence);
meta_topic (META_DEBUG_STARTUP,
"Setting initial window timestamp to %u based on startup info\n",
"Setting initial window timestamp to %u based on startup info",
timestamp);
window->initial_timestamp_set = TRUE;
@@ -3374,7 +3374,7 @@ meta_display_apply_startup_properties (MetaDisplay *display,
else
{
meta_topic (META_DEBUG_STARTUP,
"Did not find startup sequence for window %s ID \"%s\"\n",
"Did not find startup sequence for window %s ID \"%s\"",
window->desc, startup_id);
}
@@ -3385,7 +3385,7 @@ static gboolean
set_work_area_later_func (MetaDisplay *display)
{
meta_topic (META_DEBUG_WORKAREA,
"Running work area hint computation function\n");
"Running work area hint computation function");
display->work_area_later = 0;
@@ -3401,7 +3401,7 @@ meta_display_queue_workarea_recalc (MetaDisplay *display)
if (display->work_area_later == 0)
{
meta_topic (META_DEBUG_WORKAREA,
"Adding work area hint computation function\n");
"Adding work area hint computation function");
display->work_area_later =
meta_later_add (META_LATER_BEFORE_REDRAW,
(GSourceFunc) set_work_area_later_func,
@@ -3747,7 +3747,7 @@ meta_display_get_pointer_window (MetaDisplay *display,
if (not_this_one)
meta_topic (META_DEBUG_FOCUS,
"Focusing mouse window excluding %s\n", not_this_one->desc);
"Focusing mouse window excluding %s", not_this_one->desc);
meta_cursor_tracker_get_pointer (cursor_tracker, &point, NULL);