xnest: wrap the xnest cursor sprite funcs around the mi funcs.

Modelled after the xfree86 code. Call miDCInitialize to init the SW rendering
engine, then take the pointers, store it in a xnest-local variable, and put
the xnest-specific sprite funcs in place. In the xnest sprite funcs, call
through to the mi sprite funcs after doing xnest-specific stuff.
This commit is contained in:
Peter Hutterer 2008-06-09 11:23:53 +09:30
commit e083b5a075
3 changed files with 47 additions and 4 deletions

View file

@ -25,6 +25,7 @@ is" without express or implied warranty.
#include "cursorstr.h"
#include "scrnintstr.h"
#include "servermd.h"
#include "mipointrst.h"
#include "Xnest.h"
@ -35,6 +36,8 @@ is" without express or implied warranty.
#include "Keyboard.h"
#include "Args.h"
xnestCursorFuncRec xnestCursorFuncs = {NULL};
Bool
xnestRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
{
@ -155,3 +158,26 @@ void
xnestMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
{
}
Bool
xnestDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
{
xnestCursorFuncPtr pScreenPriv;
pScreenPriv = (xnestCursorFuncPtr)
dixLookupPrivate(&pScreen->devPrivates, xnestCursorScreenKey);
pScreenPriv->spriteFuncs->DeviceCursorInitialize(pDev, pScreen);
return TRUE;
}
void
xnestDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
{
xnestCursorFuncPtr pScreenPriv;
pScreenPriv = (xnestCursorFuncPtr)
dixLookupPrivate(&pScreen->devPrivates, xnestCursorScreenKey);
pScreenPriv->spriteFuncs->DeviceCursorCleanup(pDev, pScreen);
}