]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for not sending a native click to a control if it is not enabled (does an enable...
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 31 Aug 2004 18:54:24 +0000 (18:54 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 31 Aug 2004 18:54:24 +0000 (18:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/toplevel.cpp

index 597b6caa9aab4f50200802ce5661ff18a0988310..714293fc36be981546c744ba238cc55861046c2d 100644 (file)
@@ -535,13 +535,16 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev
                 (FindControlUnderMouse(windowMouseLocation , window , &dummyPart) != 
                 wxMacFindControlUnderMouse( windowMouseLocation , window , &dummyPart ) ) )
             {
-                EventModifiers modifiers = cEvent.GetParameter<EventModifiers>(kEventParamKeyModifiers, typeUInt32) ;
-                Point clickLocation = windowMouseLocation ;
-#if TARGET_API_MAC_OSX
-                currentMouseWindow->MacRootWindowToWindow( &clickLocation.h , &clickLocation.v ) ;
-#endif
-                HandleControlClick( (ControlRef) currentMouseWindow->GetHandle() , clickLocation ,
-                    modifiers , (ControlActionUPP ) -1 ) ;
+                if ( currentMouseWindow->MacIsReallyEnabled() ) 
+                {
+                    EventModifiers modifiers = cEvent.GetParameter<EventModifiers>(kEventParamKeyModifiers, typeUInt32) ;
+                    Point clickLocation = windowMouseLocation ;
+    #if TARGET_API_MAC_OSX
+                    currentMouseWindow->MacRootWindowToWindow( &clickLocation.h , &clickLocation.v ) ;
+    #endif
+                    HandleControlClick( (ControlRef) currentMouseWindow->GetHandle() , clickLocation ,
+                        modifiers , (ControlActionUPP ) -1 ) ;
+                }
                 result = noErr ;
             }
         }