summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXMouseEvent.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXMouseEvent.c')
-rw-r--r--macosx/tkMacOSXMouseEvent.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c
index fd9bbc1..e33f787 100644
--- a/macosx/tkMacOSXMouseEvent.c
+++ b/macosx/tkMacOSXMouseEvent.c
@@ -133,6 +133,7 @@ enum {
buttonState &= ~TkGetButtonMask(button);
break;
case NSLeftMouseDragged:
+ buttonState |= TkGetButtonMask(button);
if (![NSApp tkDragTarget]) {
if (isOutside) {
ignoreDrags = YES;
@@ -248,7 +249,7 @@ enum {
}
/*
- * If this click will change the focus, the Tk event event should
+ * If this click will change the focus, the Tk event should
* be sent to the toplevel which will be receiving focus rather than to
* the current focus window. So reset tkEventTarget.
*/
@@ -404,7 +405,6 @@ enum {
* not in the grabber's subtree.
*/
-
if (grabWinPtr && /* There is a grab in effect ... */
!winPtr->dispPtr->grabFlags && /* and it is a local grab ... */
grabWinPtr->mainPtr == winPtr->mainPtr){ /* in the same application. */
@@ -500,7 +500,7 @@ enum {
Tk_UpdatePointer((Tk_Window) [NSApp tkDragTarget],
global.x, global.y, state);
} else {
- Tk_UpdatePointer(NULL, global.x, global.y, state);
+ Tk_UpdatePointer(NULL, global.x, global.y, state);
}
} else if (eventType == NSMouseMoved ||
eventType == NSLeftMouseDragged) {
@@ -818,7 +818,6 @@ GenerateButtonEvent(
tkwin = Tk_TopCoordsToWindow(tkwin, medPtr->local.h, medPtr->local.v,
&dummy, &dummy);
}
-
Tk_UpdatePointer(tkwin, medPtr->global.h, medPtr->global.v, medPtr->state);
return true;
}