randr: drop unused RRPointerMoved()

Not used anywhere, so no need to keep it any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-05-16 16:04:11 +02:00
parent 00435fea20
commit 79d0a49442
2 changed files with 0 additions and 56 deletions

View File

@ -884,10 +884,6 @@ extern _X_EXPORT Bool
extern _X_EXPORT void extern _X_EXPORT void
RROutputInitErrorValue(void); RROutputInitErrorValue(void);
/* rrpointer.c */
extern _X_EXPORT void
RRPointerMoved(ScreenPtr pScreen, int x, int y);
extern _X_EXPORT void extern _X_EXPORT void
RRPointerScreenConfigured(ScreenPtr pScreen); RRPointerScreenConfigured(ScreenPtr pScreen);

View File

@ -27,31 +27,6 @@
#include "randrstr.h" #include "randrstr.h"
#include "inputstr.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' * 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; 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 * When the screen is reconfigured, move all pointers to the nearest
* CRTC * CRTC