x11: Do not warn on cancelled X11 selection sources
This shouldn't happen frequently, but is just a sign that the source is being replaced by something else. Just keep the warning for other possible error situations. Also, plug the potential GError leak. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/598
This commit is contained in:
parent
329c4bc5b3
commit
9e82f9af25
@ -249,7 +249,7 @@ source_new_cb (GObject *object,
|
||||
MetaSelection *selection = data->selection;
|
||||
MetaSelectionType selection_type = data->selection_type;
|
||||
MetaX11Display *x11_display = data->x11_display;
|
||||
GError *error = NULL;
|
||||
g_autoptr (GError) error = NULL;
|
||||
|
||||
source = meta_selection_source_x11_new_finish (res, &error);
|
||||
if (source)
|
||||
@ -257,7 +257,7 @@ source_new_cb (GObject *object,
|
||||
meta_selection_set_owner (selection, selection_type, source);
|
||||
g_set_object (&x11_display->selection.owners[selection_type], source);
|
||||
}
|
||||
else
|
||||
else if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
||||
{
|
||||
g_warning ("Could not create selection source for X11: %s",
|
||||
error->message);
|
||||
|
Loading…
Reference in New Issue
Block a user