From e9a4bf7ddc491520ea74ca4f07767a449a067405 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 28 Dec 2006 16:08:38 +0000 Subject: [PATCH] fix to always have a proper activation for DataBrowser controls (stay in bkgnd otherwise) bug 1621547 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/window.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index f4e4f26dbd..5764a89abf 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -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(kEventParamWindowRef); + if ( !IsWindowActive(owner) ) + { + cEvent.SetParameter(kEventParamClickActivation,(UInt32) kActivateAndIgnoreClick) ; + result = noErr ; + } + } + break ; + default : break ; }