diff options
Diffstat (limited to 'generic/tkPointer.c')
-rw-r--r-- | generic/tkPointer.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/generic/tkPointer.c b/generic/tkPointer.c index 905489a..2fbdedf 100644 --- a/generic/tkPointer.c +++ b/generic/tkPointer.c @@ -6,7 +6,7 @@ * to generate appropriate enter/leave events, and to update the global * grab window information. * - * Copyright (c) 1996 Sun Microsystems, Inc. + * Copyright © 1996 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -20,7 +20,6 @@ #if defined(MAC_OSX_TK) #include "tkMacOSXInt.h" -#define Cursor XCursor #endif typedef struct { @@ -126,7 +125,7 @@ GenerateEnterLeave( int state) /* State flags. */ { int crossed = 0; /* 1 if mouse crossed a window boundary */ - ThreadSpecificData *tsdPtr = + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); TkWindow *restrictWinPtr = tsdPtr->restrictWinPtr; TkWindow *lastWinPtr = tsdPtr->lastWinPtr; @@ -219,7 +218,7 @@ Tk_UpdatePointer( int x, int y, /* Pointer location in root coords. */ int state) /* Modifier state mask. */ { - ThreadSpecificData *tsdPtr = + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); TkWindow *winPtr = (TkWindow *)tkwin; TkWindow *targetWinPtr; @@ -255,8 +254,8 @@ Tk_UpdatePointer( * between the current button state and the last known button state. */ - for (b = Button1; b <= Button5; b++) { - mask = TkGetButtonMask(b); + for (b = Button1; b <= Button9; b++) { + mask = Tk_GetButtonMask(b); if (changes & mask) { if (state & mask) { type = ButtonPress; @@ -425,8 +424,15 @@ XGrabPointer( Cursor cursor, Time time) { - ThreadSpecificData *tsdPtr = + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + (void)owner_events; + (void)event_mask; + (void)pointer_mode; + (void)keyboard_mode; + (void)confine_to; + (void)cursor; + (void)time; LastKnownRequestProcessed(display)++; tsdPtr->grabWinPtr = (TkWindow *) Tk_IdToWindow(display, grab_window); @@ -460,8 +466,9 @@ XUngrabPointer( Display *display, Time time) { - ThreadSpecificData *tsdPtr = + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + (void)time; LastKnownRequestProcessed(display)++; tsdPtr->grabWinPtr = NULL; @@ -491,7 +498,7 @@ void TkPointerDeadWindow( TkWindow *winPtr) { - ThreadSpecificData *tsdPtr = + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (winPtr == tsdPtr->lastWinPtr) { @@ -538,7 +545,7 @@ UpdateCursor( TkWindow *winPtr) { Cursor cursor = None; - ThreadSpecificData *tsdPtr = + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); /* @@ -584,8 +591,9 @@ XDefineCursor( Cursor cursor) { TkWindow *winPtr = (TkWindow *) Tk_IdToWindow(display, w); - ThreadSpecificData *tsdPtr = + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + (void)cursor; if (tsdPtr->cursorWinPtr == winPtr) { UpdateCursor(winPtr); |