hi all is it possible to get an event as soon as the application in focus changes. we can get current app in focus by using RWsSession::GetFocusWindowGroup().
but what i want is that OS notify me as soon as the current focussed app changes.
hi i dont think this will resolve the problem as it only notifies when ur application gets the focus.
I want to be notified whenever focus changes from one application to another. I think if i call RWindowTreeNode::EnableGroupChangeEvents() or RWindowTreeNode::EnableFocusChangeEvents() i'll be notified with EEventWindowGroupsChanged and EEventFocusGroupChanged respectively. this will resolve my problem.
But again a new problem how do i get a reference of RWindowTreeNode class.
we can get a reference of RWindowGroup using RWindowGroup& iWinGrp = CCoeEnv::Static()->RootWin();
but the now the call to functions EnableFocusChangeEvents() and EnableGroupChangeEvents() is not reporting any events... may be i dont know where to catch these events ( am doing them in Container's OfferKeyEventL() and in AppUi's HandleKeyEventL() )
Forum posts: 5
maybe you can try to use CAknAppUi::HandleForegroundEventL.
{
if(!aForeground)
{
//App losts focus
}
else
{
//App gains focus
}
CAknAppUi::HandleForegroundEventL(aForeground);
}
Forum posts: 84
i dont think this will resolve the problem as it only notifies when ur application gets the focus.
I want to be notified whenever focus changes from one application to another. I think if i call RWindowTreeNode::EnableGroupChangeEvents() or RWindowTreeNode::EnableFocusChangeEvents() i'll be notified with EEventWindowGroupsChanged and EEventFocusGroupChanged respectively. this will resolve my problem.
But again a new problem how do i get a reference of RWindowTreeNode class.
any comments.
warm regards
saurabh
Forum posts: 84
RWindowGroup& iWinGrp = CCoeEnv::Static()->RootWin();
may be i dont know where to catch these events ( am doing them in Container's OfferKeyEventL() and in AppUi's HandleKeyEventL() )
Please help
warm regards
saurabh
Forum posts: 84
got the solution. event is reported in HandleWsEventL of appui.
warm regards
saurabh
Forum posts: 21
how you implement it in HandleWsEventL?
when i insert HandleWsEventL then my application doesn't react on something.
please help
series60.ch
Forum posts: 84
warm regards
saurabh
Forum posts: 21
series60.ch