mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 04:42:14 +00:00
x11: Wrap X call with error traps
Lest it fails. Try to recover from that and keep reading the mimetypes present in the atom list. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6555 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2945>
This commit is contained in:
parent
2e82702084
commit
1e459c8302
@ -21,6 +21,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "meta/meta-x11-errors.h"
|
||||
#include "x11/meta-x11-selection-input-stream-private.h"
|
||||
#include "x11/meta-selection-source-x11-private.h"
|
||||
|
||||
@ -156,7 +157,13 @@ atoms_to_mimetypes (MetaX11Display *display,
|
||||
{
|
||||
const gchar *mimetype;
|
||||
|
||||
meta_x11_error_trap_push (display);
|
||||
mimetype = XGetAtomName (xdisplay, atoms[i]);
|
||||
meta_x11_error_trap_pop (display);
|
||||
|
||||
if (!mimetype)
|
||||
continue;
|
||||
|
||||
mimetypes = g_list_prepend (mimetypes, g_strdup (mimetype));
|
||||
|
||||
utf8_text_plain_found |= strcmp (mimetype, "text/plain;charset=utf-8") == 0;
|
||||
|
Loading…
Reference in New Issue
Block a user