--- a/bluetoothengine/bthid/mouse/PaintCursor/src/paintcursorappui.cpp Tue Feb 02 00:20:42 2010 +0200
+++ b/bluetoothengine/bthid/mouse/PaintCursor/src/paintcursorappui.cpp Fri Apr 16 15:08:36 2010 +0300
@@ -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
+ }
+ }
+