[PATCH 12/19] xf86: migrate PointerMoved from index to ScrnInfoPtr (ABI/API)

Dave Airlie airlied at gmail.com
Mon May 14 09:41:05 PDT 2012


This migrates PointerMoved from an index to ScrnInfoPtr.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 hw/xfree86/common/xf86Cursor.c |    7 +++----
 hw/xfree86/common/xf86str.h    |    2 +-
 hw/xfree86/modes/xf86RandR12.c |    5 ++---
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c
index 3461297..68f597b 100644
--- a/hw/xfree86/common/xf86Cursor.c
+++ b/hw/xfree86/common/xf86Cursor.c
@@ -66,7 +66,7 @@ static Bool xf86CursorOffScreen(ScreenPtr *pScreen, int *x, int *y);
 static void xf86CrossScreen(ScreenPtr pScreen, Bool entering);
 static void xf86WarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y);
 
-static void xf86PointerMoved(int scrnIndex, int x, int y);
+static void xf86PointerMoved(ScrnInfoPtr pScrn, int x, int y);
 
 static miPointerScreenFuncRec xf86PointerScreenFuncs = {
     xf86CursorOffScreen,
@@ -135,14 +135,13 @@ xf86SetViewport(ScreenPtr pScreen, int x, int y)
 {
     ScrnInfoPtr pScr = xf86ScreenToScrn(pScreen);
 
-    (*pScr->PointerMoved) (pScreen->myNum, x, y);
+    (*pScr->PointerMoved) (pScr, x, y);
 }
 
 static void
-xf86PointerMoved(int scrnIndex, int x, int y)
+xf86PointerMoved(ScrnInfoPtr pScr, int x, int y)
 {
     Bool frameChanged = FALSE;
-    ScrnInfoPtr pScr = xf86Screens[scrnIndex];
 
     /*
      * check wether (x,y) belongs to the visual part of the screen
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 9a4467e..b2410d1 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -655,7 +655,7 @@ typedef ModeStatus xf86ValidModeProc(ScrnInfoPtr, DisplayModePtr, Bool, int);
 typedef void xf86EnableDisableFBAccessProc(ScrnInfoPtr, Bool);
 typedef int xf86SetDGAModeProc(ScrnInfoPtr, int, DGADevicePtr);
 typedef int xf86ChangeGammaProc(ScrnInfoPtr, Gamma);
-typedef void xf86PointerMovedProc(int, int, int);
+typedef void xf86PointerMovedProc(ScrnInfoPtr, int, int);
 typedef Bool xf86PMEventProc(ScrnInfoPtr, pmEvent, Bool);
 typedef void xf86DPMSSetProc(ScrnInfoPtr, int, int);
 typedef void xf86LoadPaletteProc(ScrnInfoPtr, int, int *, LOCO *, VisualPtr);
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index df4a3d6..99d49a4 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -1596,10 +1596,9 @@ xf86RandR12TellChanged(ScreenPtr pScreen)
 }
 
 static void
-xf86RandR12PointerMoved(int scrnIndex, int x, int y)
+xf86RandR12PointerMoved(ScrnInfoPtr pScrn, int x, int y)
 {
-    ScreenPtr pScreen = screenInfo.screens[scrnIndex];
-    ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
+    ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
     xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
     XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
     int c;
-- 
1.7.6



More information about the xorg-devel mailing list