From 8d3696f39a0b3af725b7615f7e2ac74ce5e0bcbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Sat, 21 Oct 2023 00:45:49 +0800 Subject: [PATCH] monitor-manager/x11: Ignore errors when creating tiled monitors The error is most likely a race where the tiled outputs disappeared before we had the chance to turn them into a whole monitor. Ignoring the error should be harmless, as we should be receive another RANDR event where we'd eventually fix things up. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7120 Part-of: --- src/backends/x11/meta-monitor-manager-xrandr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backends/x11/meta-monitor-manager-xrandr.c b/src/backends/x11/meta-monitor-manager-xrandr.c index 128a34b9f..97ba112e8 100644 --- a/src/backends/x11/meta-monitor-manager-xrandr.c +++ b/src/backends/x11/meta-monitor-manager-xrandr.c @@ -770,9 +770,11 @@ meta_monitor_manager_xrandr_tiled_monitor_added (MetaMonitorManager *manager, xrandr_monitor_info->outputs[i] = meta_output_get_id (output); } + mtk_x11_error_trap_push (manager_xrandr->xdisplay); XRRSetMonitor (manager_xrandr->xdisplay, DefaultRootWindow (manager_xrandr->xdisplay), xrandr_monitor_info); + mtk_x11_error_trap_pop (manager_xrandr->xdisplay); XRRFreeMonitors (xrandr_monitor_info); }