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)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Thu, 1 Jun 2023 22:30:14 +0000 (00:30 +0200)
commitf2a28891532cfb4fb27fae263750d6853fa93f64
treeb6aae6b1c36af7189321bae3921725295e03a42b
parentb520a5cedaefb7ee3122001ad25663c39eab505d
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