2003-11-14 16:54:54 +01:00
|
|
|
/*
|
|
|
|
|
|
|
|
Copyright 1989, 1998 The Open Group
|
|
|
|
|
|
|
|
Permission to use, copy, modify, distribute, and sell this software and its
|
|
|
|
documentation for any purpose is hereby granted without fee, provided that
|
|
|
|
the above copyright notice appear in all copies and that both that
|
|
|
|
copyright notice and this permission notice appear in supporting
|
|
|
|
documentation.
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
|
|
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
Except as contained in this notice, the name of The Open Group shall not be
|
|
|
|
used in advertising or otherwise to promote the sale, use or other dealings
|
|
|
|
in this Software without prior written authorization from The Open Group.
|
|
|
|
*/
|
|
|
|
|
2005-08-21 21:29:55 +02:00
|
|
|
#ifdef HAVE_DIX_CONFIG_H
|
|
|
|
#include <dix-config.h>
|
|
|
|
#endif
|
|
|
|
|
2005-04-20 14:25:48 +02:00
|
|
|
# include <X11/X.h>
|
|
|
|
# include <X11/Xmd.h>
|
|
|
|
# include <X11/Xproto.h>
|
2003-11-14 16:54:54 +01:00
|
|
|
# include "misc.h"
|
|
|
|
# include "windowstr.h"
|
|
|
|
# include "pixmapstr.h"
|
|
|
|
# include "mi.h"
|
|
|
|
# include "scrnintstr.h"
|
|
|
|
# include "mipointrst.h"
|
|
|
|
# include "cursorstr.h"
|
|
|
|
# include "dixstruct.h"
|
2006-10-08 16:44:37 +02:00
|
|
|
# include "inputstr.h"
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2010-04-27 02:22:21 +02:00
|
|
|
DevPrivateKeyRec miPointerScreenKeyRec;
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2007-08-28 15:28:25 +02:00
|
|
|
#define GetScreenPrivate(s) ((miPointerScreenPtr) \
|
|
|
|
dixLookupPrivate(&(s)->devPrivates, miPointerScreenKey))
|
2003-11-14 16:54:54 +01:00
|
|
|
#define SetupScreen(s) miPointerScreenPtr pScreenPriv = GetScreenPrivate(s)
|
|
|
|
|
2010-04-27 02:22:21 +02:00
|
|
|
DevPrivateKeyRec miPointerPrivKeyRec;
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2006-12-14 01:20:18 +01:00
|
|
|
#define MIPOINTER(dev) \
|
2009-05-21 04:07:03 +02:00
|
|
|
((!IsMaster(dev) && !dev->u.master) ? \
|
2008-01-03 07:34:54 +01:00
|
|
|
(miPointerPtr)dixLookupPrivate(&(dev)->devPrivates, miPointerPrivKey): \
|
2009-05-21 04:07:03 +02:00
|
|
|
(miPointerPtr)dixLookupPrivate(&(GetMaster(dev, MASTER_POINTER))->devPrivates, miPointerPrivKey))
|
2006-11-17 05:40:37 +01:00
|
|
|
|
2006-11-23 07:45:14 +01:00
|
|
|
static Bool miPointerRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
|
|
|
CursorPtr pCursor);
|
|
|
|
static Bool miPointerUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
|
|
|
CursorPtr pCursor);
|
|
|
|
static Bool miPointerDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
|
|
|
CursorPtr pCursor);
|
2006-11-21 05:16:00 +01:00
|
|
|
static void miPointerConstrainCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
|
|
|
BoxPtr pBox);
|
2006-11-23 07:45:14 +01:00
|
|
|
static void miPointerCursorLimits(DeviceIntPtr pDev, ScreenPtr pScreen,
|
|
|
|
CursorPtr pCursor, BoxPtr pHotBox,
|
|
|
|
BoxPtr pTopLeftBox);
|
|
|
|
static Bool miPointerSetCursorPosition(DeviceIntPtr pDev, ScreenPtr pScreen,
|
|
|
|
int x, int y,
|
2003-11-14 17:49:22 +01:00
|
|
|
Bool generateEvent);
|
|
|
|
static Bool miPointerCloseScreen(int index, ScreenPtr pScreen);
|
2006-11-23 07:45:14 +01:00
|
|
|
static void miPointerMove(DeviceIntPtr pDev, ScreenPtr pScreen,
|
2008-10-08 08:19:45 +02:00
|
|
|
int x, int y);
|
2007-04-09 12:01:59 +02:00
|
|
|
static Bool miPointerDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen);
|
|
|
|
static void miPointerDeviceCleanup(DeviceIntPtr pDev,
|
|
|
|
ScreenPtr pScreen);
|
2010-07-02 07:25:14 +02:00
|
|
|
static void miPointerMoveNoEvent (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y);
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2007-05-02 06:20:09 +02:00
|
|
|
static EventList* events; /* for WarpPointer MotionNotifies */
|
2007-02-16 00:27:57 +01:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
Bool
|
2008-05-28 04:57:07 +02:00
|
|
|
miPointerInitialize (ScreenPtr pScreen,
|
|
|
|
miPointerSpriteFuncPtr spriteFuncs,
|
|
|
|
miPointerScreenFuncPtr screenFuncs,
|
|
|
|
Bool waitForUpdate)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
|
|
|
miPointerScreenPtr pScreenPriv;
|
|
|
|
|
2010-04-27 02:22:21 +02:00
|
|
|
if (!dixRegisterPrivateKey(&miPointerScreenKeyRec, PRIVATE_SCREEN, 0))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
if (!dixRegisterPrivateKey(&miPointerPrivKeyRec, PRIVATE_DEVICE, 0))
|
|
|
|
return FALSE;
|
|
|
|
|
2010-05-05 20:44:06 +02:00
|
|
|
pScreenPriv = malloc(sizeof (miPointerScreenRec));
|
2003-11-14 16:54:54 +01:00
|
|
|
if (!pScreenPriv)
|
|
|
|
return FALSE;
|
|
|
|
pScreenPriv->spriteFuncs = spriteFuncs;
|
|
|
|
pScreenPriv->screenFuncs = screenFuncs;
|
|
|
|
/*
|
|
|
|
* check for uninitialized methods
|
|
|
|
*/
|
|
|
|
if (!screenFuncs->EnqueueEvent)
|
|
|
|
screenFuncs->EnqueueEvent = mieqEnqueue;
|
|
|
|
if (!screenFuncs->NewEventScreen)
|
|
|
|
screenFuncs->NewEventScreen = mieqSwitchScreen;
|
|
|
|
pScreenPriv->waitForUpdate = waitForUpdate;
|
2003-11-14 17:49:22 +01:00
|
|
|
pScreenPriv->showTransparent = FALSE;
|
2003-11-14 16:54:54 +01:00
|
|
|
pScreenPriv->CloseScreen = pScreen->CloseScreen;
|
|
|
|
pScreen->CloseScreen = miPointerCloseScreen;
|
2007-08-28 15:28:25 +02:00
|
|
|
dixSetPrivate(&pScreen->devPrivates, miPointerScreenKey, pScreenPriv);
|
2003-11-14 16:54:54 +01:00
|
|
|
/*
|
|
|
|
* set up screen cursor method table
|
|
|
|
*/
|
|
|
|
pScreen->ConstrainCursor = miPointerConstrainCursor;
|
|
|
|
pScreen->CursorLimits = miPointerCursorLimits;
|
|
|
|
pScreen->DisplayCursor = miPointerDisplayCursor;
|
|
|
|
pScreen->RealizeCursor = miPointerRealizeCursor;
|
|
|
|
pScreen->UnrealizeCursor = miPointerUnrealizeCursor;
|
|
|
|
pScreen->SetCursorPosition = miPointerSetCursorPosition;
|
|
|
|
pScreen->RecolorCursor = miRecolorCursor;
|
2007-04-09 12:01:59 +02:00
|
|
|
pScreen->DeviceCursorInitialize = miPointerDeviceInitialize;
|
|
|
|
pScreen->DeviceCursorCleanup = miPointerDeviceCleanup;
|
2006-12-14 01:20:18 +01:00
|
|
|
|
2007-02-16 00:27:57 +01:00
|
|
|
events = NULL;
|
2003-11-14 16:54:54 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Bool
|
2008-05-28 04:57:07 +02:00
|
|
|
miPointerCloseScreen (int index, ScreenPtr pScreen)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
2008-06-14 03:35:29 +02:00
|
|
|
#if 0
|
2006-12-14 01:20:18 +01:00
|
|
|
miPointerPtr pPointer;
|
2007-04-09 12:01:59 +02:00
|
|
|
DeviceIntPtr pDev;
|
2008-06-14 03:35:29 +02:00
|
|
|
#endif
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2006-12-14 01:20:18 +01:00
|
|
|
SetupScreen(pScreen);
|
2006-11-27 06:24:33 +01:00
|
|
|
|
2007-04-09 12:01:59 +02:00
|
|
|
#if 0
|
|
|
|
for (pDev = inputInfo.devices; pDev; pDev = pDev->next)
|
2006-11-17 08:33:43 +01:00
|
|
|
{
|
2007-04-09 12:01:59 +02:00
|
|
|
if (DevHasCursor(pDev))
|
|
|
|
{
|
|
|
|
pPointer = MIPOINTER(pDev);
|
|
|
|
|
|
|
|
if (pScreen == pPointer->pScreen)
|
|
|
|
pPointer->pScreen = 0;
|
|
|
|
if (pScreen == pPointer->pSpriteScreen)
|
|
|
|
pPointer->pSpriteScreen = 0;
|
|
|
|
}
|
2006-11-17 08:33:43 +01:00
|
|
|
}
|
2006-11-27 06:24:33 +01:00
|
|
|
|
2007-04-09 12:01:59 +02:00
|
|
|
if (MIPOINTER(inputInfo.pointer)->pScreen == pScreen)
|
|
|
|
MIPOINTER(inputInfo.pointer)->pScreen = 0;
|
|
|
|
if (MIPOINTER(inputInfo.pointer)->pSpriteScreen == pScreen)
|
|
|
|
MIPOINTER(inputInfo.pointer)->pSpriteScreen = 0;
|
|
|
|
#endif
|
|
|
|
|
2003-11-14 16:54:54 +01:00
|
|
|
pScreen->CloseScreen = pScreenPriv->CloseScreen;
|
2010-05-05 20:44:06 +02:00
|
|
|
free((pointer) pScreenPriv);
|
2007-05-02 06:20:09 +02:00
|
|
|
FreeEventList(events, GetMaximumEventsNum());
|
2007-02-16 00:27:57 +01:00
|
|
|
events = NULL;
|
2003-11-14 16:54:54 +01:00
|
|
|
return (*pScreen->CloseScreen) (index, pScreen);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* DIX/DDX interface routines
|
|
|
|
*/
|
|
|
|
|
|
|
|
static Bool
|
2008-05-28 04:57:07 +02:00
|
|
|
miPointerRealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
|
|
|
SetupScreen(pScreen);
|
2006-11-17 05:40:37 +01:00
|
|
|
return (*pScreenPriv->spriteFuncs->RealizeCursor) (pDev, pScreen, pCursor);
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static Bool
|
2008-05-28 04:57:07 +02:00
|
|
|
miPointerUnrealizeCursor (DeviceIntPtr pDev,
|
|
|
|
ScreenPtr pScreen,
|
|
|
|
CursorPtr pCursor)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
|
|
|
SetupScreen(pScreen);
|
2006-11-17 05:40:37 +01:00
|
|
|
return (*pScreenPriv->spriteFuncs->UnrealizeCursor) (pDev, pScreen, pCursor);
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static Bool
|
2008-05-28 04:57:07 +02:00
|
|
|
miPointerDisplayCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
2007-10-17 02:22:30 +02:00
|
|
|
miPointerPtr pPointer;
|
2008-05-28 04:57:07 +02:00
|
|
|
|
2008-05-12 12:35:43 +02:00
|
|
|
/* return for keyboards */
|
2009-05-20 07:28:16 +02:00
|
|
|
if ((IsMaster(pDev) && !DevHasCursor(pDev)) ||
|
|
|
|
(!IsMaster(pDev) && pDev->u.master && !DevHasCursor(pDev->u.master)))
|
2008-05-21 08:21:35 +02:00
|
|
|
return FALSE;
|
2008-05-12 12:35:43 +02:00
|
|
|
|
2007-10-17 02:22:30 +02:00
|
|
|
pPointer = MIPOINTER(pDev);
|
2006-12-14 01:20:18 +01:00
|
|
|
|
2006-11-27 06:24:33 +01:00
|
|
|
pPointer->pCursor = pCursor;
|
|
|
|
pPointer->pScreen = pScreen;
|
|
|
|
miPointerUpdateSprite(pDev);
|
2003-11-14 16:54:54 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2008-05-28 04:57:07 +02:00
|
|
|
miPointerConstrainCursor (DeviceIntPtr pDev, ScreenPtr pScreen, BoxPtr pBox)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
2007-10-17 02:22:30 +02:00
|
|
|
miPointerPtr pPointer;
|
|
|
|
|
|
|
|
pPointer = MIPOINTER(pDev);
|
2006-12-14 01:20:18 +01:00
|
|
|
|
2006-11-21 08:45:04 +01:00
|
|
|
pPointer->limits = *pBox;
|
|
|
|
pPointer->confined = PointerConfinedToScreen(pDev);
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*ARGSUSED*/
|
|
|
|
static void
|
2008-05-28 04:57:07 +02:00
|
|
|
miPointerCursorLimits(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
|
|
|
|
BoxPtr pHotBox, BoxPtr pTopLeftBox)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
|
|
|
*pTopLeftBox = *pHotBox;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Bool GenerateEvent;
|
|
|
|
|
|
|
|
static Bool
|
2008-05-28 04:57:07 +02:00
|
|
|
miPointerSetCursorPosition(DeviceIntPtr pDev, ScreenPtr pScreen,
|
|
|
|
int x, int y, Bool generateEvent)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
|
|
|
SetupScreen (pScreen);
|
|
|
|
|
|
|
|
GenerateEvent = generateEvent;
|
|
|
|
/* device dependent - must pend signal and call miPointerWarpCursor */
|
2006-11-23 07:45:14 +01:00
|
|
|
(*pScreenPriv->screenFuncs->WarpCursor) (pDev, pScreen, x, y);
|
2003-11-14 16:54:54 +01:00
|
|
|
if (!generateEvent)
|
2006-11-23 07:45:14 +01:00
|
|
|
miPointerUpdateSprite(pDev);
|
2003-11-14 16:54:54 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2008-05-28 04:57:07 +02:00
|
|
|
/* Set up sprite information for the device.
|
2007-04-09 12:01:59 +02:00
|
|
|
This function will be called once for each device after it is initialized
|
|
|
|
in the DIX.
|
2008-05-28 04:57:07 +02:00
|
|
|
*/
|
2007-04-09 12:01:59 +02:00
|
|
|
static Bool
|
2008-05-28 04:57:07 +02:00
|
|
|
miPointerDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
|
2007-04-09 12:01:59 +02:00
|
|
|
{
|
|
|
|
miPointerPtr pPointer;
|
|
|
|
SetupScreen (pScreen);
|
|
|
|
|
2010-05-05 20:44:06 +02:00
|
|
|
pPointer = malloc(sizeof(miPointerRec));
|
2007-04-09 12:01:59 +02:00
|
|
|
if (!pPointer)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
pPointer->pScreen = NULL;
|
|
|
|
pPointer->pSpriteScreen = NULL;
|
|
|
|
pPointer->pCursor = NULL;
|
|
|
|
pPointer->pSpriteCursor = NULL;
|
|
|
|
pPointer->limits.x1 = 0;
|
|
|
|
pPointer->limits.x2 = 32767;
|
|
|
|
pPointer->limits.y1 = 0;
|
|
|
|
pPointer->limits.y2 = 32767;
|
|
|
|
pPointer->confined = FALSE;
|
|
|
|
pPointer->x = 0;
|
|
|
|
pPointer->y = 0;
|
|
|
|
|
|
|
|
if (!((*pScreenPriv->spriteFuncs->DeviceCursorInitialize)(pDev, pScreen)))
|
|
|
|
{
|
2010-05-05 20:44:06 +02:00
|
|
|
free(pPointer);
|
2007-04-09 12:01:59 +02:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2008-01-03 07:34:54 +01:00
|
|
|
dixSetPrivate(&pDev->devPrivates, miPointerPrivKey, pPointer);
|
2007-04-09 12:01:59 +02:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2008-05-28 04:57:07 +02:00
|
|
|
/* Clean up after device.
|
2007-04-09 12:01:59 +02:00
|
|
|
This function will be called once before the device is freed in the DIX
|
|
|
|
*/
|
|
|
|
static void
|
2008-05-28 04:57:07 +02:00
|
|
|
miPointerDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
|
2007-04-09 12:01:59 +02:00
|
|
|
{
|
2009-01-11 08:42:57 +01:00
|
|
|
SetupScreen(pScreen);
|
|
|
|
|
2009-05-20 07:28:16 +02:00
|
|
|
if (!IsMaster(pDev) && pDev->u.master)
|
2008-05-22 15:54:29 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
(*pScreenPriv->spriteFuncs->DeviceCursorCleanup)(pDev, pScreen);
|
2010-05-05 20:44:06 +02:00
|
|
|
free(dixLookupPrivate(&pDev->devPrivates, miPointerPrivKey));
|
2008-05-22 15:54:29 +02:00
|
|
|
dixSetPrivate(&pDev->devPrivates, miPointerPrivKey, NULL);
|
2007-04-09 12:01:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-11-14 16:54:54 +01:00
|
|
|
/* Once signals are ignored, the WarpCursor function can call this */
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2008-05-28 04:57:07 +02:00
|
|
|
miPointerWarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
2007-10-17 02:22:30 +02:00
|
|
|
miPointerPtr pPointer;
|
2007-11-24 06:46:48 +01:00
|
|
|
BOOL changedScreen = FALSE;
|
2008-03-04 08:41:10 +01:00
|
|
|
|
2003-11-14 16:54:54 +01:00
|
|
|
SetupScreen (pScreen);
|
2009-01-11 08:42:57 +01:00
|
|
|
pPointer = MIPOINTER(pDev);
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2006-11-23 07:45:14 +01:00
|
|
|
if (pPointer->pScreen != pScreen)
|
2007-11-24 06:46:48 +01:00
|
|
|
{
|
2007-04-26 08:28:50 +02:00
|
|
|
(*pScreenPriv->screenFuncs->NewEventScreen) (pDev, pScreen, TRUE);
|
2007-11-24 06:46:48 +01:00
|
|
|
changedScreen = TRUE;
|
|
|
|
}
|
2003-11-14 16:54:54 +01:00
|
|
|
|
|
|
|
if (GenerateEvent)
|
2008-10-08 08:19:45 +02:00
|
|
|
miPointerMove (pDev, pScreen, x, y);
|
2003-11-14 16:54:54 +01:00
|
|
|
else
|
2010-07-02 07:25:14 +02:00
|
|
|
miPointerMoveNoEvent(pDev, pScreen, x, y);
|
2008-02-05 09:04:31 +01:00
|
|
|
|
2009-02-02 01:20:13 +01:00
|
|
|
/* Don't call USFS if we use Xinerama, otherwise the root window is
|
|
|
|
* updated to the second screen, and we never receive any events.
|
|
|
|
* (FDO bug #18668) */
|
|
|
|
if (changedScreen
|
|
|
|
#ifdef PANORAMIX
|
|
|
|
&& noPanoramiXExtension
|
|
|
|
#endif
|
|
|
|
)
|
2007-11-24 06:46:48 +01:00
|
|
|
UpdateSpriteForScreen (pDev, pScreen) ;
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Pointer/CursorDisplay interface routines
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2008-05-16 11:52:32 +02:00
|
|
|
* miPointerUpdateSprite
|
2003-11-14 16:54:54 +01:00
|
|
|
*
|
|
|
|
* Syncronize the sprite with the cursor - called from ProcessInputEvents
|
|
|
|
*/
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2006-10-08 16:44:37 +02:00
|
|
|
miPointerUpdateSprite (DeviceIntPtr pDev)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
|
|
|
ScreenPtr pScreen;
|
|
|
|
miPointerScreenPtr pScreenPriv;
|
2003-11-14 17:49:22 +01:00
|
|
|
CursorPtr pCursor;
|
2003-11-14 16:54:54 +01:00
|
|
|
int x, y, devx, devy;
|
2006-12-14 01:20:18 +01:00
|
|
|
miPointerPtr pPointer;
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2008-05-22 15:54:29 +02:00
|
|
|
if (!pDev || !pDev->coreEvents)
|
2006-10-08 19:34:32 +02:00
|
|
|
return;
|
|
|
|
|
2006-12-14 01:20:18 +01:00
|
|
|
pPointer = MIPOINTER(pDev);
|
2006-11-17 08:33:43 +01:00
|
|
|
|
2009-04-30 06:58:00 +02:00
|
|
|
if (!pPointer)
|
|
|
|
return;
|
|
|
|
|
2006-11-21 08:45:04 +01:00
|
|
|
pScreen = pPointer->pScreen;
|
2006-10-08 19:34:32 +02:00
|
|
|
if (!pScreen)
|
|
|
|
return;
|
|
|
|
|
2006-11-21 08:45:04 +01:00
|
|
|
x = pPointer->x;
|
|
|
|
y = pPointer->y;
|
|
|
|
devx = pPointer->devx;
|
|
|
|
devy = pPointer->devy;
|
2006-10-08 19:34:32 +02:00
|
|
|
|
2003-11-14 16:54:54 +01:00
|
|
|
pScreenPriv = GetScreenPrivate (pScreen);
|
|
|
|
/*
|
|
|
|
* if the cursor has switched screens, disable the sprite
|
|
|
|
* on the old screen
|
|
|
|
*/
|
2006-11-21 08:45:04 +01:00
|
|
|
if (pScreen != pPointer->pSpriteScreen)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
2006-11-21 08:45:04 +01:00
|
|
|
if (pPointer->pSpriteScreen)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
|
|
|
miPointerScreenPtr pOldPriv;
|
|
|
|
|
2006-11-21 08:45:04 +01:00
|
|
|
pOldPriv = GetScreenPrivate (pPointer->pSpriteScreen);
|
|
|
|
if (pPointer->pCursor)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
|
|
|
(*pOldPriv->spriteFuncs->SetCursor)
|
2006-11-21 08:45:04 +01:00
|
|
|
(pDev, pPointer->pSpriteScreen, NullCursor, 0, 0);
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|
2006-11-21 08:45:04 +01:00
|
|
|
(*pOldPriv->screenFuncs->CrossScreen) (pPointer->pSpriteScreen, FALSE);
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|
|
|
|
(*pScreenPriv->screenFuncs->CrossScreen) (pScreen, TRUE);
|
|
|
|
(*pScreenPriv->spriteFuncs->SetCursor)
|
2006-11-21 08:45:04 +01:00
|
|
|
(pDev, pScreen, pPointer->pCursor, x, y);
|
|
|
|
pPointer->devx = x;
|
|
|
|
pPointer->devy = y;
|
|
|
|
pPointer->pSpriteCursor = pPointer->pCursor;
|
|
|
|
pPointer->pSpriteScreen = pScreen;
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|
|
|
|
/*
|
|
|
|
* if the cursor has changed, display the new one
|
|
|
|
*/
|
2006-11-21 08:45:04 +01:00
|
|
|
else if (pPointer->pCursor != pPointer->pSpriteCursor)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
2006-11-21 08:45:04 +01:00
|
|
|
pCursor = pPointer->pCursor;
|
2008-05-12 12:35:43 +02:00
|
|
|
if (!pCursor || (pCursor->bits->emptyMask && !pScreenPriv->showTransparent))
|
2003-11-14 17:49:22 +01:00
|
|
|
pCursor = NullCursor;
|
2006-11-17 05:40:37 +01:00
|
|
|
(*pScreenPriv->spriteFuncs->SetCursor) (pDev, pScreen, pCursor, x, y);
|
2003-11-14 17:49:22 +01:00
|
|
|
|
2006-11-21 08:45:04 +01:00
|
|
|
pPointer->devx = x;
|
|
|
|
pPointer->devy = y;
|
|
|
|
pPointer->pSpriteCursor = pPointer->pCursor;
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|
|
|
|
else if (x != devx || y != devy)
|
|
|
|
{
|
2006-11-21 08:45:04 +01:00
|
|
|
pPointer->devx = x;
|
|
|
|
pPointer->devy = y;
|
2008-05-12 12:35:43 +02:00
|
|
|
if(pPointer->pCursor && !pPointer->pCursor->bits->emptyMask)
|
2006-11-17 05:40:37 +01:00
|
|
|
(*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y);
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2006-10-08 19:34:32 +02:00
|
|
|
miPointerSetScreen(DeviceIntPtr pDev, int screen_no, int x, int y)
|
2003-11-14 17:49:22 +01:00
|
|
|
{
|
|
|
|
miPointerScreenPtr pScreenPriv;
|
|
|
|
ScreenPtr pScreen;
|
2008-05-22 15:54:29 +02:00
|
|
|
miPointerPtr pPointer;
|
2007-10-17 02:22:30 +02:00
|
|
|
|
|
|
|
pPointer = MIPOINTER(pDev);
|
2003-11-14 17:49:22 +01:00
|
|
|
|
|
|
|
pScreen = screenInfo.screens[screen_no];
|
|
|
|
pScreenPriv = GetScreenPrivate (pScreen);
|
2007-04-26 08:28:50 +02:00
|
|
|
(*pScreenPriv->screenFuncs->NewEventScreen) (pDev, pScreen, FALSE);
|
2006-11-23 07:45:14 +01:00
|
|
|
NewCurrentScreen (pDev, pScreen, x, y);
|
2006-12-14 01:20:18 +01:00
|
|
|
|
2006-11-23 07:45:14 +01:00
|
|
|
pPointer->limits.x2 = pScreen->width;
|
|
|
|
pPointer->limits.y2 = pScreen->height;
|
2003-11-14 17:49:22 +01:00
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
ScreenPtr
|
2009-01-11 08:42:28 +01:00
|
|
|
miPointerCurrentScreen (void)
|
2003-11-14 17:49:22 +01:00
|
|
|
{
|
2006-10-08 19:34:32 +02:00
|
|
|
return miPointerGetScreen(inputInfo.pointer);
|
2003-11-14 17:49:22 +01:00
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
ScreenPtr
|
2006-10-08 19:34:32 +02:00
|
|
|
miPointerGetScreen(DeviceIntPtr pDev)
|
|
|
|
{
|
2008-05-22 15:54:29 +02:00
|
|
|
miPointerPtr pPointer = MIPOINTER(pDev);
|
|
|
|
return (pPointer) ? pPointer->pScreen : NULL;
|
2006-10-08 19:34:32 +02:00
|
|
|
}
|
2003-11-14 16:54:54 +01:00
|
|
|
|
2010-06-04 04:00:53 +02:00
|
|
|
/* Controls whether the cursor image should be updated immediately when
|
|
|
|
moved (FALSE) or if something else will be responsible for updating
|
|
|
|
it later (TRUE). Returns current setting.
|
|
|
|
Caller is responsible for calling OsBlockSignal first.
|
|
|
|
*/
|
|
|
|
Bool
|
|
|
|
miPointerSetWaitForUpdate(ScreenPtr pScreen, Bool wait)
|
|
|
|
{
|
|
|
|
SetupScreen(pScreen);
|
|
|
|
Bool prevWait = pScreenPriv->waitForUpdate;
|
|
|
|
|
|
|
|
pScreenPriv->waitForUpdate = wait;
|
|
|
|
return prevWait;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-03-25 23:56:32 +02:00
|
|
|
/* Move the pointer on the current screen, and update the sprite. */
|
|
|
|
static void
|
2010-07-02 07:25:14 +02:00
|
|
|
miPointerMoveNoEvent (DeviceIntPtr pDev, ScreenPtr pScreen,
|
2008-10-08 08:19:45 +02:00
|
|
|
int x, int y)
|
2007-03-25 23:56:32 +02:00
|
|
|
{
|
2007-10-17 02:22:30 +02:00
|
|
|
miPointerPtr pPointer;
|
2007-03-25 23:56:32 +02:00
|
|
|
SetupScreen(pScreen);
|
|
|
|
|
2007-10-17 02:22:30 +02:00
|
|
|
pPointer = MIPOINTER(pDev);
|
2007-04-02 08:06:26 +02:00
|
|
|
|
2008-05-16 13:26:04 +02:00
|
|
|
/* Hack: We mustn't call into ->MoveCursor for anything but the
|
|
|
|
* VCP, as this may cause a non-HW rendered cursor to be rendered during
|
|
|
|
* SIGIO. This again leads to allocs during SIGIO which leads to SIGABRT.
|
|
|
|
*/
|
2009-05-20 07:28:16 +02:00
|
|
|
if ((pDev == inputInfo.pointer || (!IsMaster(pDev) && pDev->u.master == inputInfo.pointer))
|
2007-04-02 08:06:26 +02:00
|
|
|
&& !pScreenPriv->waitForUpdate && pScreen == pPointer->pSpriteScreen)
|
2007-03-25 23:56:32 +02:00
|
|
|
{
|
2007-04-02 08:06:26 +02:00
|
|
|
pPointer->devx = x;
|
|
|
|
pPointer->devy = y;
|
2008-05-14 02:12:50 +02:00
|
|
|
if(pPointer->pCursor && !pPointer->pCursor->bits->emptyMask)
|
2007-04-02 08:06:26 +02:00
|
|
|
(*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y);
|
2007-03-25 23:56:32 +02:00
|
|
|
}
|
|
|
|
|
2007-04-02 08:06:26 +02:00
|
|
|
pPointer->x = x;
|
|
|
|
pPointer->y = y;
|
|
|
|
pPointer->pScreen = pScreen;
|
2007-03-25 23:56:32 +02:00
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2008-10-08 08:19:45 +02:00
|
|
|
miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
|
|
|
miPointerScreenPtr pScreenPriv;
|
|
|
|
ScreenPtr pScreen;
|
|
|
|
ScreenPtr newScreen;
|
|
|
|
|
2007-10-17 02:22:30 +02:00
|
|
|
miPointerPtr pPointer;
|
2006-11-17 08:33:43 +01:00
|
|
|
|
2010-04-16 17:35:55 +02:00
|
|
|
if (!pDev || !pDev->coreEvents)
|
|
|
|
return;
|
|
|
|
|
2007-10-17 02:22:30 +02:00
|
|
|
pPointer = MIPOINTER(pDev);
|
2006-11-21 08:45:04 +01:00
|
|
|
pScreen = pPointer->pScreen;
|
2003-11-14 16:54:54 +01:00
|
|
|
if (!pScreen)
|
|
|
|
return; /* called before ready */
|
2006-10-08 16:44:37 +02:00
|
|
|
|
2006-10-08 19:34:32 +02:00
|
|
|
if (*x < 0 || *x >= pScreen->width || *y < 0 || *y >= pScreen->height)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
|
|
|
pScreenPriv = GetScreenPrivate (pScreen);
|
2006-11-21 08:45:04 +01:00
|
|
|
if (!pPointer->confined)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
|
|
|
newScreen = pScreen;
|
2006-10-08 19:34:32 +02:00
|
|
|
(*pScreenPriv->screenFuncs->CursorOffScreen) (&newScreen, x, y);
|
2003-11-14 16:54:54 +01:00
|
|
|
if (newScreen != pScreen)
|
|
|
|
{
|
|
|
|
pScreen = newScreen;
|
2007-04-26 08:28:50 +02:00
|
|
|
(*pScreenPriv->screenFuncs->NewEventScreen) (pDev, pScreen,
|
|
|
|
FALSE);
|
2003-11-14 16:54:54 +01:00
|
|
|
pScreenPriv = GetScreenPrivate (pScreen);
|
|
|
|
/* Smash the confine to the new screen */
|
2006-11-21 08:45:04 +01:00
|
|
|
pPointer->limits.x2 = pScreen->width;
|
|
|
|
pPointer->limits.y2 = pScreen->height;
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2006-10-08 19:34:32 +02:00
|
|
|
/* Constrain the sprite to the current limits. */
|
2006-11-21 08:45:04 +01:00
|
|
|
if (*x < pPointer->limits.x1)
|
|
|
|
*x = pPointer->limits.x1;
|
|
|
|
if (*x >= pPointer->limits.x2)
|
|
|
|
*x = pPointer->limits.x2 - 1;
|
|
|
|
if (*y < pPointer->limits.y1)
|
|
|
|
*y = pPointer->limits.y1;
|
|
|
|
if (*y >= pPointer->limits.y2)
|
|
|
|
*y = pPointer->limits.y2 - 1;
|
|
|
|
|
|
|
|
if (pPointer->x == *x && pPointer->y == *y &&
|
|
|
|
pPointer->pScreen == pScreen)
|
|
|
|
return;
|
2006-10-08 19:34:32 +02:00
|
|
|
|
2010-07-02 07:25:14 +02:00
|
|
|
miPointerMoveNoEvent(pDev, pScreen, *x, *y);
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2006-10-08 16:44:37 +02:00
|
|
|
miPointerGetPosition(DeviceIntPtr pDev, int *x, int *y)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
2007-10-17 02:22:30 +02:00
|
|
|
*x = MIPOINTER(pDev)->x;
|
|
|
|
*y = MIPOINTER(pDev)->y;
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|
|
|
|
|
2009-01-11 10:56:45 +01:00
|
|
|
#ifdef XQUARTZ
|
|
|
|
#include <pthread.h>
|
|
|
|
void darwinEvents_lock(void);
|
|
|
|
void darwinEvents_unlock(void);
|
|
|
|
#endif
|
|
|
|
|
2006-10-08 19:34:32 +02:00
|
|
|
void
|
2008-10-08 08:19:45 +02:00
|
|
|
miPointerMove (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
|
2006-10-08 19:34:32 +02:00
|
|
|
{
|
2007-02-16 00:27:57 +01:00
|
|
|
int i, nevents;
|
|
|
|
int valuators[2];
|
|
|
|
|
2010-07-02 07:25:14 +02:00
|
|
|
miPointerMoveNoEvent(pDev, pScreen, x, y);
|
2007-02-16 00:27:57 +01:00
|
|
|
|
|
|
|
/* generate motion notify */
|
|
|
|
valuators[0] = x;
|
|
|
|
valuators[1] = y;
|
|
|
|
|
|
|
|
if (!events)
|
|
|
|
{
|
2007-05-02 06:20:09 +02:00
|
|
|
events = InitEventList(GetMaximumEventsNum());
|
2007-02-16 00:27:57 +01:00
|
|
|
|
|
|
|
if (!events)
|
|
|
|
{
|
|
|
|
FatalError("Could not allocate event store.\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-01-12 06:29:36 +01:00
|
|
|
nevents = GetPointerEvents(events, pDev, MotionNotify, 0, POINTER_SCREEN | POINTER_ABSOLUTE, 0, 2, valuators);
|
2007-02-16 00:27:57 +01:00
|
|
|
|
2007-05-02 06:20:09 +02:00
|
|
|
OsBlockSignals();
|
2009-01-11 10:56:45 +01:00
|
|
|
#ifdef XQUARTZ
|
|
|
|
darwinEvents_lock();
|
|
|
|
#endif
|
2007-02-16 00:27:57 +01:00
|
|
|
for (i = 0; i < nevents; i++)
|
2009-04-09 00:40:20 +02:00
|
|
|
mieqEnqueue(pDev, (InternalEvent*)events[i].event);
|
2009-01-11 10:56:45 +01:00
|
|
|
#ifdef XQUARTZ
|
|
|
|
darwinEvents_unlock();
|
|
|
|
#endif
|
2007-05-02 06:20:09 +02:00
|
|
|
OsReleaseSignals();
|
2006-10-08 19:34:32 +02:00
|
|
|
}
|