x11: Replace meta_warning() with g_warning()
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4005>
This commit is contained in:
parent
f44bf9fa40
commit
66c7b05991
@ -924,7 +924,7 @@ make_shadow (MetaShadow *shadow,
|
|||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
meta_warning ("Failed to allocate shadow texture: %s", error->message);
|
g_warning ("Failed to allocate shadow texture: %s", error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -366,9 +366,11 @@ meta_x11_display_dispose (GObject *object)
|
|||||||
mtk_x11_error_trap_push (x11_display->xdisplay);
|
mtk_x11_error_trap_push (x11_display->xdisplay);
|
||||||
XSelectInput (x11_display->xdisplay, x11_display->xroot, 0);
|
XSelectInput (x11_display->xdisplay, x11_display->xroot, 0);
|
||||||
if (mtk_x11_error_trap_pop_with_return (x11_display->xdisplay) != Success)
|
if (mtk_x11_error_trap_pop_with_return (x11_display->xdisplay) != Success)
|
||||||
meta_warning ("Could not release screen %d on display \"%s\"",
|
{
|
||||||
|
g_warning ("Could not release screen %d on display \"%s\"",
|
||||||
DefaultScreen (x11_display->xdisplay),
|
DefaultScreen (x11_display->xdisplay),
|
||||||
x11_display->name);
|
x11_display->name);
|
||||||
|
}
|
||||||
|
|
||||||
x11_display->xroot = None;
|
x11_display->xroot = None;
|
||||||
}
|
}
|
||||||
@ -647,7 +649,7 @@ init_x11_bell (MetaX11Display *x11_display)
|
|||||||
NULL, NULL))
|
NULL, NULL))
|
||||||
{
|
{
|
||||||
x11_display->xkb_base_event_type = -1;
|
x11_display->xkb_base_event_type = -1;
|
||||||
meta_warning ("could not find XKB extension.");
|
g_warning ("Could not find XKB extension.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -853,7 +855,9 @@ take_manager_selection (MetaX11Display *x11_display,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
meta_warning (_("Display “%s” already has a window manager; try using the --replace option to replace the current window manager."),
|
g_warning (_("Display “%s” already has a window manager; "
|
||||||
|
"try using the --replace option to replace "
|
||||||
|
"the current window manager."),
|
||||||
x11_display->name);
|
x11_display->name);
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
@ -868,7 +872,8 @@ take_manager_selection (MetaX11Display *x11_display,
|
|||||||
|
|
||||||
if (XGetSelectionOwner (x11_display->xdisplay, manager_atom) != new_owner)
|
if (XGetSelectionOwner (x11_display->xdisplay, manager_atom) != new_owner)
|
||||||
{
|
{
|
||||||
meta_warning ("Could not acquire selection: %s", XGetAtomName (x11_display->xdisplay, manager_atom));
|
g_warning ("Could not acquire selection: %s",
|
||||||
|
XGetAtomName (x11_display->xdisplay, manager_atom));
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1234,11 +1239,9 @@ open_x_display (MetaDisplay *display,
|
|||||||
|
|
||||||
if (xdisplay == NULL)
|
if (xdisplay == NULL)
|
||||||
{
|
{
|
||||||
meta_warning (_("Failed to open X Window System display “%s”"),
|
|
||||||
xdisplay_name);
|
|
||||||
|
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||||
"Failed to open X11 display");
|
_("Failed to open X Window System display “%s”"),
|
||||||
|
xdisplay_name);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -1469,11 +1472,9 @@ meta_x11_display_new (MetaDisplay *display,
|
|||||||
*/
|
*/
|
||||||
if (xroot == None)
|
if (xroot == None)
|
||||||
{
|
{
|
||||||
meta_warning (_("Screen %d on display “%s” is invalid"),
|
|
||||||
number, XDisplayName (NULL));
|
|
||||||
|
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||||
"Failed to open default X11 screen");
|
_("Screen %d on display “%s” is invalid"),
|
||||||
|
number, XDisplayName (NULL));
|
||||||
|
|
||||||
XFlush (xdisplay);
|
XFlush (xdisplay);
|
||||||
XCloseDisplay (xdisplay);
|
XCloseDisplay (xdisplay);
|
||||||
|
@ -909,14 +909,14 @@ save_state (MetaContext *context)
|
|||||||
if (mkdir (mutter_dir, 0700) < 0 &&
|
if (mkdir (mutter_dir, 0700) < 0 &&
|
||||||
errno != EEXIST)
|
errno != EEXIST)
|
||||||
{
|
{
|
||||||
meta_warning ("Could not create directory '%s': %s",
|
g_warning ("Could not create directory '%s': %s",
|
||||||
mutter_dir, g_strerror (errno));
|
mutter_dir, g_strerror (errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mkdir (session_dir, 0700) < 0 &&
|
if (mkdir (session_dir, 0700) < 0 &&
|
||||||
errno != EEXIST)
|
errno != EEXIST)
|
||||||
{
|
{
|
||||||
meta_warning ("Could not create directory '%s': %s",
|
g_warning ("Could not create directory '%s': %s",
|
||||||
session_dir, g_strerror (errno));
|
session_dir, g_strerror (errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -926,7 +926,7 @@ save_state (MetaContext *context)
|
|||||||
|
|
||||||
if (outfile == NULL)
|
if (outfile == NULL)
|
||||||
{
|
{
|
||||||
meta_warning ("Could not open session file '%s' for writing: %s",
|
g_warning ("Could not open session file '%s' for writing: %s",
|
||||||
full_save_file (), g_strerror (errno));
|
full_save_file (), g_strerror (errno));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -1072,12 +1072,12 @@ save_state (MetaContext *context)
|
|||||||
/* FIXME need a dialog for this */
|
/* FIXME need a dialog for this */
|
||||||
if (ferror (outfile))
|
if (ferror (outfile))
|
||||||
{
|
{
|
||||||
meta_warning ("Error writing session file '%s': %s",
|
g_warning ("Error writing session file '%s': %s",
|
||||||
full_save_file (), g_strerror (errno));
|
full_save_file (), g_strerror (errno));
|
||||||
}
|
}
|
||||||
if (fclose (outfile))
|
if (fclose (outfile))
|
||||||
{
|
{
|
||||||
meta_warning ("Error closing session file '%s': %s",
|
g_warning ("Error closing session file '%s': %s",
|
||||||
full_save_file (), g_strerror (errno));
|
full_save_file (), g_strerror (errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1185,7 +1185,7 @@ load_state (const char *previous_save_file)
|
|||||||
|
|
||||||
error:
|
error:
|
||||||
|
|
||||||
meta_warning ("Failed to parse saved session file: %s",
|
g_warning ("Failed to parse saved session file: %s",
|
||||||
error->message);
|
error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ complain_about_broken_client (MetaWindow *window,
|
|||||||
MetaPropValue *value,
|
MetaPropValue *value,
|
||||||
gboolean initial)
|
gboolean initial)
|
||||||
{
|
{
|
||||||
meta_warning ("Broken client! Window %s changed client leader window or SM client ID",
|
g_warning ("Window %s changed client leader window or SM client ID",
|
||||||
window->desc);
|
window->desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4300,7 +4300,7 @@ meta_window_x11_recalc_window_type (MetaWindow *window)
|
|||||||
priv->type_atom);
|
priv->type_atom);
|
||||||
mtk_x11_error_trap_pop (x11_display->xdisplay);
|
mtk_x11_error_trap_pop (x11_display->xdisplay);
|
||||||
|
|
||||||
meta_warning ("Unrecognized type atom [%s] set for %s ",
|
g_warning ("Unrecognized type atom [%s] set for %s ",
|
||||||
atom_name ? atom_name : "unknown",
|
atom_name ? atom_name : "unknown",
|
||||||
window->desc);
|
window->desc);
|
||||||
|
|
||||||
|
@ -155,7 +155,10 @@ validate_or_free_results (GetPropertyResults *results,
|
|||||||
if (res_name == NULL)
|
if (res_name == NULL)
|
||||||
res_name = "unknown";
|
res_name = "unknown";
|
||||||
|
|
||||||
meta_warning ("Window 0x%lx has property %s that was expected to have type %s format %d and actually has type %s format %d n_items %d. This is most likely an application bug, not a window manager bug. The window has title=\"%s\" class=\"%s\" name=\"%s\"",
|
g_warning ("Window 0x%lx has property %s that was expected to have type %s "
|
||||||
|
"format %d and actually has type %s format %d n_items %d. "
|
||||||
|
"This is most likely an application bug, not a window manager bug. "
|
||||||
|
"The window has title=\"%s\" class=\"%s\" name=\"%s\"",
|
||||||
results->xwindow,
|
results->xwindow,
|
||||||
prop_name ? prop_name : "(bad atom)",
|
prop_name ? prop_name : "(bad atom)",
|
||||||
expected_name ? expected_name : "(bad atom)",
|
expected_name ? expected_name : "(bad atom)",
|
||||||
@ -368,7 +371,7 @@ utf8_string_from_results (GetPropertyResults *results,
|
|||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
name = XGetAtomName (results->x11_display->xdisplay, results->xatom);
|
name = XGetAtomName (results->x11_display->xdisplay, results->xatom);
|
||||||
meta_warning ("Property %s on window 0x%lx contained invalid UTF-8",
|
g_warning ("Property %s on window 0x%lx contained invalid UTF-8",
|
||||||
name, results->xwindow);
|
name, results->xwindow);
|
||||||
meta_XFree (name);
|
meta_XFree (name);
|
||||||
g_free (results->prop);
|
g_free (results->prop);
|
||||||
@ -435,7 +438,7 @@ utf8_list_from_results (GetPropertyResults *results,
|
|||||||
mtk_x11_error_trap_push (results->x11_display->xdisplay);
|
mtk_x11_error_trap_push (results->x11_display->xdisplay);
|
||||||
name = XGetAtomName (results->x11_display->xdisplay, results->xatom);
|
name = XGetAtomName (results->x11_display->xdisplay, results->xatom);
|
||||||
mtk_x11_error_trap_pop (results->x11_display->xdisplay);
|
mtk_x11_error_trap_pop (results->x11_display->xdisplay);
|
||||||
meta_warning ("Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list",
|
g_warning ("Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list",
|
||||||
name, results->xwindow, i);
|
name, results->xwindow, i);
|
||||||
meta_XFree (name);
|
meta_XFree (name);
|
||||||
g_free (results->prop);
|
g_free (results->prop);
|
||||||
@ -628,7 +631,7 @@ text_property_to_utf8 (GetPropertyResults *results,
|
|||||||
mtk_x11_error_trap_push (results->x11_display->xdisplay);
|
mtk_x11_error_trap_push (results->x11_display->xdisplay);
|
||||||
name = XGetAtomName (results->x11_display->xdisplay, results->xatom);
|
name = XGetAtomName (results->x11_display->xdisplay, results->xatom);
|
||||||
mtk_x11_error_trap_pop (results->x11_display->xdisplay);
|
mtk_x11_error_trap_pop (results->x11_display->xdisplay);
|
||||||
meta_warning ("Property %s on window 0x%lx contained invalid UTF-8",
|
g_warning ("Property %s on window 0x%lx contained invalid UTF-8",
|
||||||
name, results->xwindow);
|
name, results->xwindow);
|
||||||
meta_XFree (name);
|
meta_XFree (name);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user