diff options
Diffstat (limited to 'generic/tkPointer.c')
-rw-r--r-- | generic/tkPointer.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/generic/tkPointer.c b/generic/tkPointer.c index 4051552..4242423 100644 --- a/generic/tkPointer.c +++ b/generic/tkPointer.c @@ -30,7 +30,7 @@ #define ALL_BUTTONS \ (Button1Mask|Button2Mask|Button3Mask|Button4Mask|Button5Mask) -static unsigned int buttonMasks[] = { +static const unsigned int buttonMasks[] = { Button1Mask, Button2Mask, Button3Mask, Button4Mask, Button5Mask }; #define ButtonMask(b) (buttonMasks[(b)-Button1]) @@ -54,7 +54,7 @@ static Tcl_ThreadDataKey dataKey; static int GenerateEnterLeave(TkWindow *winPtr, int x, int y, int state); -static void InitializeEvent(XEvent* eventPtr, TkWindow *winPtr, +static void InitializeEvent(XEvent *eventPtr, TkWindow *winPtr, int type, int x, int y, int state, int detail); static void UpdateCursor(TkWindow *winPtr); @@ -138,7 +138,7 @@ GenerateEnterLeave( int state) /* State flags. */ { int crossed = 0; /* 1 if mouse crossed a window boundary */ - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) + ThreadSpecificData *tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); TkWindow *restrictWinPtr = tsdPtr->restrictWinPtr; TkWindow *lastWinPtr = tsdPtr->lastWinPtr; @@ -231,7 +231,7 @@ Tk_UpdatePointer( int x, int y, /* Pointer location in root coords. */ int state) /* Modifier state mask. */ { - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) + ThreadSpecificData *tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); TkWindow *winPtr = (TkWindow *)tkwin; TkWindow *targetWinPtr; @@ -436,7 +436,7 @@ XGrabPointer( Cursor cursor, Time time) { - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) + ThreadSpecificData *tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); display->request++; @@ -471,7 +471,7 @@ XUngrabPointer( Display *display, Time time) { - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) + ThreadSpecificData *tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); display->request++; @@ -501,7 +501,7 @@ void TkPointerDeadWindow( TkWindow *winPtr) { - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) + ThreadSpecificData *tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (winPtr == tsdPtr->lastWinPtr) { @@ -540,7 +540,7 @@ UpdateCursor( TkWindow *winPtr) { Cursor cursor = None; - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) + ThreadSpecificData *tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); /* @@ -585,8 +585,8 @@ XDefineCursor( Window w, Cursor cursor) { - TkWindow *winPtr = (TkWindow *)Tk_IdToWindow(display, w); - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) + TkWindow *winPtr = (TkWindow *) Tk_IdToWindow(display, w); + ThreadSpecificData *tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (tsdPtr->cursorWinPtr == winPtr) { |