diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2008-02-20 18:17:34 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2008-02-20 18:17:34 +0000 |
| commit | 3e9fc08353a834e4bd06a0e6ed301dea0628f5b2 (patch) | |
| tree | 700fcd200776b3fcd780c54bb2acb0942868f574 /src/Fl_mac.cxx | |
| parent | ab406a8e79dcafa3337fbe6f000fba50945460c6 (diff) | |
Fixed recursion crash in event handling (STR #1873
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@6033 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_mac.cxx')
| -rw-r--r-- | src/Fl_mac.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx index 93f7bca61..2019f0f66 100644 --- a/src/Fl_mac.cxx +++ b/src/Fl_mac.cxx @@ -850,7 +850,7 @@ static pascal OSStatus carbonWindowHandler( EventHandlerCallRef nextHandler, Eve if ( !window->parent() ) Fl::handle( FL_HIDE, window); break; case kEventWindowActivated: - if ( window!=activeWindow ) + if ( window->shown() && window!=activeWindow ) { GetWindowClass( fl_xid( window ), &winClass ); if ( winClass != kHelpWindowClass ) { // help windows can't get the focus! @@ -899,6 +899,11 @@ static pascal OSStatus carbonMousewheelHandler( EventHandlerCallRef nextHandler, fl_os_event = event; Fl_Window *window = (Fl_Window*)userData; + if ( !window->shown() ) + { + fl_unlock_function(); + return noErr; + } Fl::first_window(window); EventMouseWheelAxis axis; @@ -954,6 +959,11 @@ static pascal OSStatus carbonMouseHandler( EventHandlerCallRef nextHandler, Even fl_os_event = event; Fl_Window *window = (Fl_Window*)userData; + if ( !window->shown() ) + { + fl_unlock_function(); + return noErr; + } Fl::first_window(window); Point pos; GetEventParameter( event, kEventParamMouseLocation, typeQDPoint, NULL, sizeof(Point), NULL, &pos ); @@ -2459,4 +2469,3 @@ void MacUnmapWindow(Fl_Window *w, WindowPtr p) { // // End of "$Id$". // - |
