--- a/bluetoothengine/bthid/mouse/PaintCursor/src/paintcursorappui.cpp Fri Mar 12 15:43:23 2010 +0200
+++ b/bluetoothengine/bthid/mouse/PaintCursor/src/paintcursorappui.cpp Mon Mar 15 12:41:15 2010 +0200
@@ -20,6 +20,7 @@
#include <eikmenup.h>
#include <e32property.h>
#include <paintcursor.rsg>
+#include <apgwgnam.h>
#include "paintcursorapp.h"
#include "paintcursorappui.h"
@@ -131,6 +132,7 @@
case ECursorHide:
{
iAppView->HideCursor();
+ EndTask();
break;
}
case ECursorNotInitialized:
@@ -159,3 +161,26 @@
task.EndTask();
}
+void CPaintCursorAppUi::HandleForegroundEventL(TBool aForeground)
+ {
+ if(aForeground)
+ {
+ TInt wgId = iEikonEnv->RootWin().Identifier();
+
+ TApaTask self( iCoeEnv->WsSession() );
+
+ self.SetWgId( wgId );
+ self.SendToBackground();
+
+ RWsSession session = iEikonEnv->WsSession();
+
+ CApaWindowGroupName* wgName = CApaWindowGroupName::NewLC(session, wgId);
+
+ wgName->SetHidden(ETrue);
+
+ wgName->SetWindowGroupName(iEikonEnv->RootWin());
+
+ CleanupStack::PopAndDestroy(); // wgName
+ }
+ }
+