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)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 5 Jun 2023 12:05:01 +0000 (08:05 -0400)
commitbd906560dd2f3070e39aead88880454368fd510b
tree02083a7165da415e9a4d35db0873f0d3366a6c45
parente86d18d77c39a1493505861342f25058e5e06df1
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.
gdk/x11/gdkscreen-x11.c