diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2006-11-19 21:04:11 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2006-11-19 21:04:11 +0000 |
| commit | 67f87f028531d487f730b823e1325dab0cd827bf (patch) | |
| tree | dee75fc5f2784b813951ac9b56e83daaaf75f0f3 /src/Fl_mac.cxx | |
| parent | 8ea3a457720b702acbdc5c5ea1c5001e525c99c1 (diff) | |
STR #1463, STR #449: Better event mouse handling fixing detached menus and sticky tooltips.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5548 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_mac.cxx')
| -rw-r--r-- | src/Fl_mac.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx index 8bc32f085..8f21001f3 100644 --- a/src/Fl_mac.cxx +++ b/src/Fl_mac.cxx @@ -967,14 +967,18 @@ static pascal OSStatus carbonMouseHandler( EventHandlerCallRef nextHandler, Even { case kEventMouseDown: part = FindWindow( pos, &tempXid ); - if ( part != inContent ) { + if ( part == inGrow && !Fl::grab()) { fl_unlock_function(); suppressed = 1; + Fl_Tooltip::current(0L); + // if (grab() && grab()!=thisWindow) handle grab first (popping down menu bars) + // if (modal() && modal()!=thisWindow) handle modal first (popping down menu bars) return CallNextEventHandler( nextHandler, event ); // let the OS handle this for us } suppressed = 0; - if ( !IsWindowActive( xid ) ) + if (part==inContent && !IsWindowActive( xid ) ) { CallNextEventHandler( nextHandler, event ); // let the OS handle the activation, but continue to get a click-through effect + } // normal handling of mouse-down follows fl_os_capture = xid; sendEvent = FL_PUSH; @@ -1019,7 +1023,12 @@ static pascal OSStatus carbonMouseHandler( EventHandlerCallRef nextHandler, Even Fl::e_x = pos.h; Fl::e_y = pos.v; SetPort( oldPort ); - Fl::handle( sendEvent, window ); + if (GetEventKind(event)==kEventMouseDown && part!=inContent) { + Fl::handle( sendEvent, window ); + CallNextEventHandler( nextHandler, event ); // let the OS handle this for us + } else { + Fl::handle( sendEvent, window ); + } break; } |
