Remove UndisplayCursor API.
We can achieve the same thing by simply displaying a NullCursor, there's no need for a separate API.
This commit is contained in:
parent
913989d643
commit
1fc1a2897e
|
@ -854,9 +854,7 @@ UndisplayDevices()
|
||||||
ScreenPtr screen = screenInfo.screens[0];
|
ScreenPtr screen = screenInfo.screens[0];
|
||||||
|
|
||||||
for (dev = inputInfo.devices; dev; dev = dev->next)
|
for (dev = inputInfo.devices; dev; dev = dev->next)
|
||||||
{
|
screen->DisplayCursor(dev, screen, NullCursor);
|
||||||
screen->UndisplayCursor(dev, screen);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -887,7 +885,7 @@ RemoveDevice(DeviceIntPtr dev)
|
||||||
return BadImplementation;
|
return BadImplementation;
|
||||||
|
|
||||||
initialized = dev->inited;
|
initialized = dev->inited;
|
||||||
screen->UndisplayCursor(dev, screen);
|
screen->DisplayCursor(dev, screen, NullCursor);
|
||||||
|
|
||||||
deviceid = dev->id;
|
deviceid = dev->id;
|
||||||
DisableDevice(dev);
|
DisableDevice(dev);
|
||||||
|
|
|
@ -38,8 +38,7 @@ static miPointerSpriteFuncRec xf86CursorSpriteFuncs = {
|
||||||
xf86CursorSetCursor,
|
xf86CursorSetCursor,
|
||||||
xf86CursorMoveCursor,
|
xf86CursorMoveCursor,
|
||||||
xf86DeviceCursorInitialize,
|
xf86DeviceCursorInitialize,
|
||||||
xf86DeviceCursorCleanup,
|
xf86DeviceCursorCleanup
|
||||||
xf86DeviceCursorUndisplay
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Screen functions */
|
/* Screen functions */
|
||||||
|
@ -504,16 +503,3 @@ xf86DeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
|
||||||
(*ScreenPriv->spriteFuncs->DeviceCursorCleanup)(pDev, pScreen);
|
(*ScreenPriv->spriteFuncs->DeviceCursorCleanup)(pDev, pScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Called on server shutdown to remove all cursors from the screen before
|
|
||||||
* bringing the server down.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
xf86DeviceCursorUndisplay(DeviceIntPtr pDev, ScreenPtr pScreen)
|
|
||||||
{
|
|
||||||
xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate(
|
|
||||||
&pScreen->devPrivates, xf86CursorScreenKey);
|
|
||||||
|
|
||||||
/* Undisplay SW cursor */
|
|
||||||
(*ScreenPriv->spriteFuncs->UndisplayCursor)(pDev, pScreen);
|
|
||||||
}
|
|
||||||
|
|
|
@ -440,10 +440,6 @@ typedef void (* MarkUnrealizedWindowProcPtr)(
|
||||||
WindowPtr /*pWin*/,
|
WindowPtr /*pWin*/,
|
||||||
Bool /*fromConfigure*/);
|
Bool /*fromConfigure*/);
|
||||||
|
|
||||||
typedef void (* UndisplayCursorProcPtr)(
|
|
||||||
DeviceIntPtr /* pDev */,
|
|
||||||
ScreenPtr /* pScreen */);
|
|
||||||
|
|
||||||
typedef Bool (* DeviceCursorInitializeProcPtr)(
|
typedef Bool (* DeviceCursorInitializeProcPtr)(
|
||||||
DeviceIntPtr /* pDev */,
|
DeviceIntPtr /* pDev */,
|
||||||
ScreenPtr /* pScreen */);
|
ScreenPtr /* pScreen */);
|
||||||
|
@ -601,7 +597,6 @@ typedef struct _Screen {
|
||||||
MarkUnrealizedWindowProcPtr MarkUnrealizedWindow;
|
MarkUnrealizedWindowProcPtr MarkUnrealizedWindow;
|
||||||
|
|
||||||
/* Device cursor procedures */
|
/* Device cursor procedures */
|
||||||
UndisplayCursorProcPtr UndisplayCursor;
|
|
||||||
DeviceCursorInitializeProcPtr DeviceCursorInitialize;
|
DeviceCursorInitializeProcPtr DeviceCursorInitialize;
|
||||||
DeviceCursorCleanupProcPtr DeviceCursorCleanup;
|
DeviceCursorCleanupProcPtr DeviceCursorCleanup;
|
||||||
} ScreenRec;
|
} ScreenRec;
|
||||||
|
|
|
@ -60,7 +60,6 @@ static Bool miPointerUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
||||||
CursorPtr pCursor);
|
CursorPtr pCursor);
|
||||||
static Bool miPointerDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
static Bool miPointerDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
||||||
CursorPtr pCursor);
|
CursorPtr pCursor);
|
||||||
static void miPointerUndisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen);
|
|
||||||
static void miPointerConstrainCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
static void miPointerConstrainCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
||||||
BoxPtr pBox);
|
BoxPtr pBox);
|
||||||
static void miPointerPointerNonInterestBox(DeviceIntPtr pDev,
|
static void miPointerPointerNonInterestBox(DeviceIntPtr pDev,
|
||||||
|
@ -113,8 +112,6 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate)
|
||||||
pScreen->ConstrainCursor = miPointerConstrainCursor;
|
pScreen->ConstrainCursor = miPointerConstrainCursor;
|
||||||
pScreen->CursorLimits = miPointerCursorLimits;
|
pScreen->CursorLimits = miPointerCursorLimits;
|
||||||
pScreen->DisplayCursor = miPointerDisplayCursor;
|
pScreen->DisplayCursor = miPointerDisplayCursor;
|
||||||
pScreen->UndisplayCursor = miPointerUndisplayCursor;
|
|
||||||
pScreen->UndisplayCursor = miPointerUndisplayCursor;
|
|
||||||
pScreen->RealizeCursor = miPointerRealizeCursor;
|
pScreen->RealizeCursor = miPointerRealizeCursor;
|
||||||
pScreen->UnrealizeCursor = miPointerUnrealizeCursor;
|
pScreen->UnrealizeCursor = miPointerUnrealizeCursor;
|
||||||
pScreen->SetCursorPosition = miPointerSetCursorPosition;
|
pScreen->SetCursorPosition = miPointerSetCursorPosition;
|
||||||
|
@ -212,16 +209,6 @@ miPointerDisplayCursor (pDev, pScreen, pCursor)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
miPointerUndisplayCursor(pDev, pScreen)
|
|
||||||
DeviceIntPtr pDev;
|
|
||||||
ScreenPtr pScreen;
|
|
||||||
{
|
|
||||||
SetupScreen(pScreen);
|
|
||||||
if (pDev->isMaster && pDev->spriteInfo->spriteOwner)
|
|
||||||
(*pScreenPriv->spriteFuncs->UndisplayCursor)(pDev, pScreen);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
miPointerConstrainCursor (pDev, pScreen, pBox)
|
miPointerConstrainCursor (pDev, pScreen, pBox)
|
||||||
DeviceIntPtr pDev;
|
DeviceIntPtr pDev;
|
||||||
|
|
|
@ -62,10 +62,6 @@ typedef struct _miPointerSpriteFuncRec {
|
||||||
DeviceIntPtr /* pDev */,
|
DeviceIntPtr /* pDev */,
|
||||||
ScreenPtr /* pScr */
|
ScreenPtr /* pScr */
|
||||||
);
|
);
|
||||||
void (*UndisplayCursor)(
|
|
||||||
DeviceIntPtr /* pDev */,
|
|
||||||
ScreenPtr /* pScr */
|
|
||||||
);
|
|
||||||
} miPointerSpriteFuncRec, *miPointerSpriteFuncPtr;
|
} miPointerSpriteFuncRec, *miPointerSpriteFuncPtr;
|
||||||
|
|
||||||
typedef struct _miPointerScreenFuncRec {
|
typedef struct _miPointerScreenFuncRec {
|
||||||
|
|
|
@ -125,7 +125,6 @@ static void miSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
||||||
CursorPtr pCursor, int x, int y);
|
CursorPtr pCursor, int x, int y);
|
||||||
static void miSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
static void miSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
||||||
int x, int y);
|
int x, int y);
|
||||||
static void miSpriteUndisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen);
|
|
||||||
|
|
||||||
_X_EXPORT miPointerSpriteFuncRec miSpritePointerFuncs = {
|
_X_EXPORT miPointerSpriteFuncRec miSpritePointerFuncs = {
|
||||||
miSpriteRealizeCursor,
|
miSpriteRealizeCursor,
|
||||||
|
@ -134,7 +133,6 @@ _X_EXPORT miPointerSpriteFuncRec miSpritePointerFuncs = {
|
||||||
miSpriteMoveCursor,
|
miSpriteMoveCursor,
|
||||||
miSpriteDeviceCursorInitialize,
|
miSpriteDeviceCursorInitialize,
|
||||||
miSpriteDeviceCursorCleanup,
|
miSpriteDeviceCursorCleanup,
|
||||||
miSpriteUndisplayCursor
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -911,23 +909,6 @@ miSpriteDeviceCursorCleanup(pDev, pScreen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
miSpriteUndisplayCursor(pDev, pScreen)
|
|
||||||
DeviceIntPtr pDev;
|
|
||||||
ScreenPtr pScreen;
|
|
||||||
{
|
|
||||||
miCursorInfoPtr pCursorInfo;
|
|
||||||
|
|
||||||
if (!pDev->isMaster && !pDev->u.master)
|
|
||||||
{
|
|
||||||
ErrorF("[mi] miSpriteUndisplayCursor called for floating device.\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
pCursorInfo = MISPRITE(pDev);
|
|
||||||
if (pCursorInfo && pCursorInfo->isUp)
|
|
||||||
miSpriteRemoveCursor(pDev, pScreen);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* undraw/draw cursor
|
* undraw/draw cursor
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue