aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common/xf86Helper.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-05-25 15:19:41 +0200
committermarha <marha@users.sourceforge.net>2012-05-25 15:19:41 +0200
commiteef864d36de97903007f04fad9fa43afe297745b (patch)
tree28dd3cae5f699b493e4d72e7e7d468a5a2cae7f4 /xorg-server/hw/xfree86/common/xf86Helper.c
parentf543ceaca6820260f15a4eff86938214cf43c7d2 (diff)
downloadvcxsrv-eef864d36de97903007f04fad9fa43afe297745b.tar.gz
vcxsrv-eef864d36de97903007f04fad9fa43afe297745b.tar.bz2
vcxsrv-eef864d36de97903007f04fad9fa43afe297745b.zip
fontconfig xserver xkeyboard-config pixman git update 2012
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Helper.c')
-rw-r--r--xorg-server/hw/xfree86/common/xf86Helper.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Helper.c b/xorg-server/hw/xfree86/common/xf86Helper.c
index 8c948cf6f..fb56a0b17 100644
--- a/xorg-server/hw/xfree86/common/xf86Helper.c
+++ b/xorg-server/hw/xfree86/common/xf86Helper.c
@@ -1577,7 +1577,7 @@ xf86SetBackingStore(ScreenPtr pScreen)
{
Bool useBS = FALSE;
MessageType from = X_DEFAULT;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
OptionInfoPtr options;
options = xnfalloc(sizeof(BSOptions));
@@ -1618,7 +1618,7 @@ xf86SetSilkenMouse(ScreenPtr pScreen)
{
Bool useSM = TRUE;
MessageType from = X_DEFAULT;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
OptionInfoPtr options;
options = xnfalloc(sizeof(SMOptions));
@@ -1834,3 +1834,17 @@ xf86MotionHistoryAllocate(InputInfoPtr pInfo)
{
AllocateMotionHistory(pInfo->dev);
}
+
+ScrnInfoPtr
+xf86ScreenToScrn(ScreenPtr pScreen)
+{
+ assert(pScreen->myNum < xf86NumScreens);
+ return xf86Screens[pScreen->myNum];
+}
+
+ScreenPtr
+xf86ScrnToScreen(ScrnInfoPtr pScrn)
+{
+ assert(pScrn->scrnIndex < screenInfo.numScreens);
+ return screenInfo.screens[pScrn->scrnIndex];
+}