diff options
author | wolfsuit <wolfsuit> | 2005-03-10 07:32:25 (GMT) |
---|---|---|
committer | wolfsuit <wolfsuit> | 2005-03-10 07:32:25 (GMT) |
commit | c6bbd37ba31a119fdbd82c318f023153f1764065 (patch) | |
tree | c4907b1fac3c1933939fe717d337a70d0b493e69 /macosx/tkMacOSXMouseEvent.c | |
parent | 9fc74a06806ba13332afec6311d42357b4df4ab3 (diff) | |
download | tk-c6bbd37ba31a119fdbd82c318f023153f1764065.zip tk-c6bbd37ba31a119fdbd82c318f023153f1764065.tar.gz tk-c6bbd37ba31a119fdbd82c318f023153f1764065.tar.bz2 |
Fix for bug 1160025.
Diffstat (limited to 'macosx/tkMacOSXMouseEvent.c')
-rw-r--r-- | macosx/tkMacOSXMouseEvent.c | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c index 168ef73..69a322b 100644 --- a/macosx/tkMacOSXMouseEvent.c +++ b/macosx/tkMacOSXMouseEvent.c @@ -334,19 +334,31 @@ TkMacOSXProcessMouseEvent(TkMacOSXEvent *eventPtr, MacEventStatus * statusPtr) switch (medPtr->windowPart) { case inDrag: - DragWindow(medPtr->whichWin, where, NULL); - where2.h = where2.v = 0; - LocalToGlobal(&where2); - if (EqualPt(where, where2)) { - return false; + { + CGrafPtr saveWorld; + GDHandle saveDevice; + GWorldPtr dstPort; + + GetGWorld(&saveWorld, &saveDevice); + dstPort = TkMacOSXGetDrawablePort(Tk_WindowId(tkwin)); + SetGWorld(dstPort, NULL); + + DragWindow(medPtr->whichWin, where, NULL); + where2.h = where2.v = 0; + LocalToGlobal(&where2); + if (EqualPt(where, where2)) { + SetGWorld (saveWorld, saveDevice); + return false; + } + TkMacOSXWindowOffset(medPtr->whichWin, &xOffset, &yOffset); + where2.h -= xOffset; + where2.v -= yOffset; + TkGenWMConfigureEvent(tkwin, where2.h, where2.v, + -1, -1, TK_LOCATION_CHANGED); + SetGWorld(saveWorld, saveDevice); + return true; + break; } - TkMacOSXWindowOffset(medPtr->whichWin, &xOffset, &yOffset); - where2.h -= xOffset; - where2.v -= yOffset; - TkGenWMConfigureEvent(tkwin, where2.h, where2.v, - -1, -1, TK_LOCATION_CHANGED); - return true; - break; case inContent: return TkGenerateButtonEvent(where.h, where.v, window, medPtr->state); |