summaryrefslogtreecommitdiffstats
path: root/generic/tkPointer.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkPointer.c')
-rw-r--r--generic/tkPointer.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/tkPointer.c b/generic/tkPointer.c
index 5ade755..70bf087 100644
--- a/generic/tkPointer.c
+++ b/generic/tkPointer.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkPointer.c,v 1.10.4.2 2009/04/10 16:20:11 das Exp $
+ * RCS: @(#) $Id: tkPointer.c,v 1.15 2010/02/21 12:14:16 dkf Exp $
*/
#include "tkInt.h"
@@ -32,7 +32,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])
@@ -56,7 +56,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);
@@ -140,7 +140,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;
@@ -233,7 +233,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;
@@ -438,7 +438,7 @@ XGrabPointer(
Cursor cursor,
Time time)
{
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
display->request++;
@@ -473,7 +473,7 @@ XUngrabPointer(
Display *display,
Time time)
{
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
display->request++;
@@ -503,7 +503,7 @@ void
TkPointerDeadWindow(
TkWindow *winPtr)
{
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
if (winPtr == tsdPtr->lastWinPtr) {
@@ -542,7 +542,7 @@ UpdateCursor(
TkWindow *winPtr)
{
Cursor cursor = None;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
/*
@@ -587,8 +587,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) {