diff --git a/randr/randrstr.h b/randr/randrstr.h index 82d9325ef..ea6da7d9c 100644 --- a/randr/randrstr.h +++ b/randr/randrstr.h @@ -884,10 +884,6 @@ extern _X_EXPORT Bool extern _X_EXPORT void RROutputInitErrorValue(void); -/* rrpointer.c */ -extern _X_EXPORT void - RRPointerMoved(ScreenPtr pScreen, int x, int y); - extern _X_EXPORT void RRPointerScreenConfigured(ScreenPtr pScreen); diff --git a/randr/rrpointer.c b/randr/rrpointer.c index 79fa16347..e1ebd9fc3 100644 --- a/randr/rrpointer.c +++ b/randr/rrpointer.c @@ -27,31 +27,6 @@ #include "randrstr.h" #include "inputstr.h" -/* - * When the pointer moves, check to see if the specified position is outside - * any of theavailable CRTCs and move it to a 'sensible' place if so, where - * sensible is the closest monitor to the departing edge. - * - * Returns whether the position was adjusted - */ - -static Bool -RRCrtcContainsPosition(RRCrtcPtr crtc, int x, int y) -{ - RRModePtr mode = crtc->mode; - int scan_width, scan_height; - - if (!mode) - return FALSE; - - RRCrtcGetScanoutSize(crtc, &scan_width, &scan_height); - - if (crtc->x <= x && x < crtc->x + scan_width && - crtc->y <= y && y < crtc->y + scan_height) - return TRUE; - return FALSE; -} - /* * Find the CRTC nearest the specified position, ignoring 'skip' */ @@ -105,33 +80,6 @@ RRPointerToNearestCrtc(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, pScrPriv->pointerCrtc = nearest; } -void -RRPointerMoved(ScreenPtr pScreen, int x, int y) -{ - rrScrPriv(pScreen); - RRCrtcPtr pointerCrtc = pScrPriv->pointerCrtc; - int c; - - /* Check last known CRTC */ - if (pointerCrtc && RRCrtcContainsPosition(pointerCrtc, x, y)) - return; - - /* Check all CRTCs */ - for (c = 0; c < pScrPriv->numCrtcs; c++) { - RRCrtcPtr crtc = pScrPriv->crtcs[c]; - - if (RRCrtcContainsPosition(crtc, x, y)) { - /* Remember containing CRTC */ - pScrPriv->pointerCrtc = crtc; - return; - } - } - - /* None contain pointer, find nearest */ - ErrorF("RRPointerMoved: Untested, may cause \"bogus pointer event\"\n"); - RRPointerToNearestCrtc(inputInfo.pointer, pScreen, x, y, pointerCrtc); -} - /* * When the screen is reconfigured, move all pointers to the nearest * CRTC