Merge pull request #12285 from alphanu1/master

Fixed CRTSwitchRes framebuffer bug
This commit is contained in:
Autechre 2021-04-20 00:21:17 +02:00 committed by GitHub
commit 7317b6b98e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -261,11 +261,14 @@ static bool x11_display_server_set_resolution(void *data,
XRRSetCrtcConfig(dpy, res,res->crtcs[i], CurrentTime,
0, 0, None, RR_Rotate_0, NULL, 0);
XSync(dpy, False);
XRRSetScreenSize(dpy, window, width, height, (int) ((25.4 * width) / 96.0), (int) ((25.4 * height) / 96.0));
XSync(dpy, False);
XRRSetCrtcConfig(dpy, res, res->crtcs[i], CurrentTime,
crtc->x, crtc->y, crtc->mode, crtc->rotation,
crtc->outputs, crtc->noutput);
XSync(dpy, False);
XRRFreeCrtcInfo(crtc);
}
@ -292,13 +295,13 @@ static bool x11_display_server_set_resolution(void *data,
XRRSetCrtcConfig(dpy, res,res->crtcs[monitor_index], CurrentTime,
0, 0, None, RR_Rotate_0, NULL, 0);
XSync(dpy, False);
XRRSetScreenSize(dpy, window, width, height, (int) ((25.4 * width) / 96.0), (int) ((25.4 * height) / 96.0));
XSync(dpy, False);
XRRSetCrtcConfig(dpy, res, res->crtcs[monitor_index], CurrentTime,
crtc->x, crtc->y, crtc->mode, crtc->rotation,
crtc->outputs, crtc->noutput);
XSync(dpy, False);
XRRFreeCrtcInfo(crtc);
}
XRRFreeOutputInfo(outputs);