diff options
author | vincentdarley <vincentdarley> | 2003-07-18 11:04:58 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley> | 2003-07-18 11:04:58 (GMT) |
commit | ed5580c0df82dff12f9679b64ba4bf1424adfd0f (patch) | |
tree | a7f72cab9fe59571cc55d0f567aab23a8ad11a66 /macosx/tkMacOSXMouseEvent.c | |
parent | 2a536d15c96c18d94c90cfb3eb881e912a960964 (diff) | |
download | tk-ed5580c0df82dff12f9679b64ba4bf1424adfd0f.zip tk-ed5580c0df82dff12f9679b64ba4bf1424adfd0f.tar.gz tk-ed5580c0df82dff12f9679b64ba4bf1424adfd0f.tar.bz2 |
MacOSX fixes
Diffstat (limited to 'macosx/tkMacOSXMouseEvent.c')
-rw-r--r-- | macosx/tkMacOSXMouseEvent.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c index 2516ef8..6a18426 100644 --- a/macosx/tkMacOSXMouseEvent.c +++ b/macosx/tkMacOSXMouseEvent.c @@ -271,11 +271,25 @@ TkMacOSXProcessMouseEvent(TkMacOSXEvent *eventPtr, MacEventStatus * statusPtr) if (!(TkpIsWindowFloating(medPtr->whichWin)) && (medPtr->whichWin != medPtr->activeNonFloating)) { Tk_Window grabWin = TkMacOSXGetCapture(); + if ((grabWin == NULL)) { + int grabState = TkGrabState((TkWindow*)tkwin); + if (grabState != TK_GRAB_NONE && grabState != TK_GRAB_IN_TREE) { + /* Now we want to set the focus to the local grabWin */ + TkMacOSXSetEatButtonUp(true); + grabWin = (Tk_Window) (((TkWindow*)tkwin)->dispPtr->grabWinPtr); + BringWindowForward(GetWindowFromPort(TkMacOSXGetDrawablePort(((TkWindow*)grabWin)->window))); + statusPtr->stopProcessing = 1; + return false; + } + } if ((grabWin != NULL) && (grabWin != tkwin)) { TkWindow * tkw, * grb; tkw = (TkWindow *)tkwin; grb = (TkWindow *)grabWin; - SysBeep(1); + /* Now we want to set the focus to the global grabWin */ + TkMacOSXSetEatButtonUp(true); + BringWindowForward(GetWindowFromPort(TkMacOSXGetDrawablePort(((TkWindow*)grabWin)->window))); + statusPtr->stopProcessing = 1; return false; } |