mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 05:31:07 +00:00
Merge branch 'wip/fix-randr-race' into 'master'
x11: Trap error when getting CRTC info See merge request GNOME/gtk!4169
This commit is contained in:
commit
9aaf54140f
@ -492,9 +492,18 @@ init_randr15 (GdkX11Screen *x11_screen)
|
||||
|
||||
if (output_info->crtc)
|
||||
{
|
||||
XRRCrtcInfo *crtc = XRRGetCrtcInfo (x11_screen->xdisplay, resources, output_info->crtc);
|
||||
XRRCrtcInfo *crtc;
|
||||
int j;
|
||||
|
||||
gdk_x11_display_error_trap_push (display);
|
||||
crtc = XRRGetCrtcInfo (x11_screen->xdisplay, resources,
|
||||
output_info->crtc);
|
||||
if (gdk_x11_display_error_trap_pop (display))
|
||||
{
|
||||
XRRFreeOutputInfo (output_info);
|
||||
continue;
|
||||
}
|
||||
|
||||
for (j = 0; j < resources->nmode; j++)
|
||||
{
|
||||
XRRModeInfo *xmode = &resources->modes[j];
|
||||
|
Loading…
Reference in New Issue
Block a user