x11: Trap XRandr errors when getting outputs during init and update
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Thu, 1 Jun 2023 22:23:51 +0000 (00:23 +0200)
committerSimon McVittie <smcv@debian.org>
Wed, 8 Nov 2023 16:30:21 +0000 (16:30 +0000)
commit8b1bf98427e1008d683fa40a2df1c942afa510d8
tree203224b50e8c74a329ada3123f69cc8add1fac27
parente4678a240517825c181df9b1bca443906533ca6f
x11: Trap XRandr errors when getting outputs during init and update

We may try to update the XRR outputs and Crtcs when they're changing in
the server, and so we may get BadRROutput that we're currently not
handling properly.

As per this, use traps and check whether we got errors, and if we did
let's ignore the current output.

It's not required to call init_randr13() again because if we got errors
it's very likely that there's a change coming that will be notified at
next iteration during which we'll repeat the init actions.

Forwarded: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6047
Origin: 3.24.39, commit:b938e4e6ac75af57ed5cd844c96738f01d57f24c

Gbp-Pq: Name x11-Trap-XRandr-errors-when-getting-outputs-during-init-a.patch
gdk/x11/gdkscreen-x11.c