mi: closing memory leak, miPointer is freed in miPointerCloseScreen

bugfix: uninitialized pPointer in miPointerGetPosition ifndef MPX
	adding DeviceIntPtr parameter to ScreenRec's cursor functions.
	cleanup of miPointer code to use same scheme in each function

dix:	MPHasCursor() function determines checking whether to invoke
	cursor rendering.

animcur: adding DeviceIntPtr parameter to cursor functions but animcur relies
	 on the core pointer right now.

xfixes: adding DeviceIntPtr parameter to cursor functions but xfixes relies on
	the core pointer right now.

rac:	adding DeviceIntPtr parameter to cursor functions but RAC relies on
	the core pointer right now.

ramdac:	adding DeviceIntPtr parameter to cursor functions but ramdac relies on
	the core pointer right now.
This commit is contained in:
Peter Hutterer 2006-11-23 17:15:14 +10:30 committed by Peter Hutterer
commit 1c7568b8a1
22 changed files with 466 additions and 269 deletions

View file

@ -131,6 +131,7 @@ extern void CheckCursorConfinement(
WindowPtr /*pWin*/);
extern void NewCurrentScreen(
struct _DeviceIntRec* /*pDev*/,
ScreenPtr /*newScreen*/,
int /*x*/,
int /*y*/);

View file

@ -821,4 +821,8 @@ extern int xstrcasecmp(char *s1, char *s2);
/* ffs.c */
extern int ffs(int i);
#ifdef MPX
extern Bool MPHasCursor(DeviceIntPtr pDev);
#endif
#endif /* DIX_H */

View file

@ -330,7 +330,7 @@ typedef struct _DeviceIntRec {
int nPrivates;
DeviceUnwrapProc unwrapProc;
#ifdef MPX
Bool isMPDev; /* TRUE if multipointer device */
Bool isMPDev; /* TRUE if multipointer device */
#endif
} DeviceIntRec;

View file

@ -121,6 +121,7 @@ typedef void (* GetSpansProcPtr)(
char * /*pdstStart*/);
typedef void (* PointerNonInterestBoxProcPtr)(
DeviceIntPtr /*pDev*/,
ScreenPtr /*pScreen*/,
BoxPtr /*pBox*/);
@ -262,29 +263,35 @@ typedef void (* ConstrainCursorProcPtr)(
BoxPtr /*pBox*/);
typedef void (* CursorLimitsProcPtr)(
DeviceIntPtr /* pDev */,
ScreenPtr /*pScreen*/,
CursorPtr /*pCursor*/,
BoxPtr /*pHotBox*/,
BoxPtr /*pTopLeftBox*/);
typedef Bool (* DisplayCursorProcPtr)(
DeviceIntPtr /* pDev */,
ScreenPtr /*pScreen*/,
CursorPtr /*pCursor*/);
typedef Bool (* RealizeCursorProcPtr)(
DeviceIntPtr /* pDev */,
ScreenPtr /*pScreen*/,
CursorPtr /*pCursor*/);
typedef Bool (* UnrealizeCursorProcPtr)(
DeviceIntPtr /* pDev */,
ScreenPtr /*pScreen*/,
CursorPtr /*pCursor*/);
typedef void (* RecolorCursorProcPtr)(
DeviceIntPtr /* pDev */,
ScreenPtr /*pScreen*/,
CursorPtr /*pCursor*/,
Bool /*displayed*/);
typedef Bool (* SetCursorPositionProcPtr)(
DeviceIntPtr /* pDev */,
ScreenPtr /*pScreen*/,
int /*x*/,
int /*y*/,