diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2021-03-23 17:05:13 +0100 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2021-10-26 16:55:12 +0200 |
commit | 1dd79c52ad51b9a68b50642dffd55e391358b2f3 (patch) | |
tree | 8ca8b93f427f951d6a1b3a07b8c9ee9753c8a9cb /src/wayland/meta-xwayland.c | |
parent | 39f80885c1365b6f1e0e459a8d9557fccef5f5e1 (diff) | |
download | mutter-1dd79c52ad51b9a68b50642dffd55e391358b2f3.tar.gz |
xwayland: Trap errors when setting primary RANDR output
This will be crucial when we start to remove the global directly when an
output is removed, as that means Xwayland might have removed the output
before we managed to get our queries in.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1796>
Diffstat (limited to 'src/wayland/meta-xwayland.c')
-rw-r--r-- | src/wayland/meta-xwayland.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c index 10bfab90b..1a79c9434 100644 --- a/src/wayland/meta-xwayland.c +++ b/src/wayland/meta-xwayland.c @@ -49,6 +49,7 @@ #include "backends/meta-settings-private.h" #include "meta/main.h" #include "meta/meta-backend.h" +#include "meta/meta-x11-errors.h" #include "wayland/meta-xwayland-surface.h" #include "x11/meta-x11-display-private.h" @@ -1374,6 +1375,7 @@ meta_xwayland_set_primary_output (MetaX11Display *x11_display) if (!resources) return; + meta_x11_error_trap_push (x11_display); for (i = 0; i < resources->noutput; i++) { RROutput output_id = resources->outputs[i]; @@ -1407,6 +1409,7 @@ meta_xwayland_set_primary_output (MetaX11Display *x11_display) break; } } + meta_x11_error_trap_pop (x11_display); XRRFreeScreenResources (resources); } |