Commit 3cd7d333 authored by Egbert Eich's avatar Egbert Eich Committed by Adam Jackson

randr: Remove senseless checks for xf86RandR12Key

When xf86RandR12Key is not set we will not get to the places where
these tests are done as the functions in question are not called.
In most cases we would have crashed before these checks anyway.
Signed-off-by: default avatarEgbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent 245040f0
......@@ -683,11 +683,9 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen,
Bool ret = FALSE;
int c;
if (xf86RandR12Key) {
if (randrp->virtualX == -1 || randrp->virtualY == -1) {
randrp->virtualX = pScrn->virtualX;
randrp->virtualY = pScrn->virtualY;
}
if (randrp->virtualX == -1 || randrp->virtualY == -1) {
randrp->virtualX = pScrn->virtualX;
randrp->virtualY = pScrn->virtualY;
}
if (pRoot && pScrn->vtSema)
(*pScrn->EnableDisableFBAccess) (pScrn, FALSE);
......@@ -730,7 +728,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen,
if (pRoot && pScrn->vtSema)
(*pScrn->EnableDisableFBAccess) (pScrn, TRUE);
#if RANDR_12_INTERFACE
if (xf86RandR12Key && pScreen->root && ret)
if (pScreen->root && ret)
RRScreenSizeNotify(pScreen);
#endif
return ret;
......@@ -826,9 +824,6 @@ xf86RandR12CreateScreenResources(ScreenPtr pScreen)
xf86RandR12ScreenSetSize(pScreen, width, height, mmWidth, mmHeight);
}
if (xf86RandR12Key == NULL)
return TRUE;
if (randrp->virtualX == -1 || randrp->virtualY == -1) {
randrp->virtualX = pScrn->virtualX;
randrp->virtualY = pScrn->virtualY;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment