diff options
-rw-r--r-- | generic/tkPointer.c | 10 | ||||
-rw-r--r-- | generic/tkWindow.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXSubwindows.c | 2 | ||||
-rw-r--r-- | win/tkWinPointer.c | 5 |
4 files changed, 9 insertions, 10 deletions
diff --git a/generic/tkPointer.c b/generic/tkPointer.c index cc67401..37a2100 100644 --- a/generic/tkPointer.c +++ b/generic/tkPointer.c @@ -243,11 +243,15 @@ Tk_UpdatePointer( /* * Generate Enter/Leave events. If the pointer has crossed window * boundaries, update the current mouse position so we don't generate - * redundant motion events. + * redundant motion events. Do this only if the mouse has moved + * since the last time we looked. */ - if (GenerateEnterLeave(winPtr, x, y, tsdPtr->lastState)) { - tsdPtr->lastPos = pos; + + if (tsdPtr->lastPos.x != x || tsdPtr->lastPos.y != y) { + if (GenerateEnterLeave(winPtr, x, y, tsdPtr->lastState)) { + tsdPtr->lastPos = pos; + } } /* diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 92c4018..9750ed8 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -1272,7 +1272,7 @@ Tk_DestroyWindow( /* * Some cleanup needs to be done immediately, rather than later, because - * it needs information that will be destoyed before we get to the main + * it needs information that will be destroyed before we get to the main * cleanup point. For example, TkFocusDeadWindow needs to access the * parentPtr field from a window, but if a Destroy event handler deletes * the window's parent this field will be NULL before the main cleanup diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c index 280c041..d220895 100644 --- a/macosx/tkMacOSXSubwindows.c +++ b/macosx/tkMacOSXSubwindows.c @@ -105,7 +105,7 @@ XDestroyWindow( macWin->view = nil; /* - * Delay deletion of a toplevel data structure untill all children have + * Delay deletion of a toplevel data structure until all children have * been deleted. */ diff --git a/win/tkWinPointer.c b/win/tkWinPointer.c index 06cbe67..8f42dcd 100644 --- a/win/tkWinPointer.c +++ b/win/tkWinPointer.c @@ -232,11 +232,6 @@ MouseTimerProc( mouseTimerSet = 0; - /* - * Get the current mouse position and window. Don't do anything if the - * mouse hasn't moved since the last time we looked. - */ - GetCursorPos(&pos); Tk_PointerEvent(NULL, pos.x, pos.y); } |