]> git.saurik.com Git - wxWidgets.git/commitdiff
fix to always have a proper activation for DataBrowser controls (stay in bkgnd otherw...
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 28 Dec 2006 16:08:38 +0000 (16:08 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 28 Dec 2006 16:08:38 +0000 (16:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/window.cpp

index f4e4f26dbd84d90318dcf222a8e67b32830519d9..5764a89abfcd1ba51d10e62211490e7ac7912e0e 100644 (file)
@@ -156,6 +156,7 @@ static const EventTypeSpec eventList[] =
     { kEventClassCommand, kEventProcessCommand } ,
     { kEventClassCommand, kEventCommandUpdateStatus } ,
 
+    { kEventClassControl , kEventControlGetClickActivation } ,
     { kEventClassControl , kEventControlHit } ,
 
     { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } ,
@@ -350,6 +351,18 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
             result = thisWindow->MacControlHit( handler , event ) ;
             break ;
 
+        case kEventControlGetClickActivation :
+            {
+               // fix to always have a proper activation for DataBrowser controls (stay in bkgnd otherwise)
+                WindowRef owner = cEvent.GetParameter<WindowRef>(kEventParamWindowRef);
+                if ( !IsWindowActive(owner) )
+                {
+                    cEvent.SetParameter(kEventParamClickActivation,(UInt32) kActivateAndIgnoreClick) ;
+                    result = noErr ;
+                }
+            }
+            break ;
+
         default :
             break ;
     }