summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@freedesktop.org>2015-03-31 09:06:46 +0200
committerAdam Jackson <ajax@redhat.com>2015-10-26 12:18:59 -0400
commitc72d4f00277c977faecd697ef3407518f11f909d (patch)
tree7855171da982f0adc8275fa20f6065ae9a82a0f5
parent7a53179425ab5112adcace1489cad6e8072af6b1 (diff)
downloadxserver-c72d4f00277c977faecd697ef3407518f11f909d.tar.gz
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: Egbert Eich <eich@freedesktop.org> Reviewed-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 3cd7d33380953f2a315dd79ab74d7340c83fd80a)
-rw-r--r--hw/xfree86/modes/xf86RandR12.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index b1c306a88..5c1ba71da 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -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;