ginebra2/Application.cpp
changeset 9 b39122337a00
parent 3 0954f5dd2cd0
child 12 afcd8e6d025b
--- a/ginebra2/Application.cpp	Mon Jul 12 15:46:53 2010 -0400
+++ b/ginebra2/Application.cpp	Fri Aug 06 17:23:08 2010 -0400
@@ -22,6 +22,11 @@
 #include <QtGui>
 #include "Application.h"
 
+#ifdef Q_OS_SYMBIAN
+#include <eikenv.h>
+#include <apgtask.h>                // TApaTaskList, TApaTask
+#endif
+
 /* Application wraps the QApplication class to provide a JS interface. This could be implemented
  * as a derived class, but this would force the application developer to use this class instead
  * of QApplication.
@@ -47,6 +52,16 @@
   m_app->quit();
 }
 
+void GinebraApplication::sendToBackground()
+{
+    //qDebug() << "GinebraApplication::goToBackground()";
+#ifdef Q_OS_SYMBIAN
+    TApaTask task(CEikonEnv::Static()->WsSession());
+    task.SetWgId(CEikonEnv::Static()->RootWin().Identifier());
+    task.SendToBackground();
+#endif
+}
+
 void GinebraApplication::debug(const QString &msg) {
       qDebug() << msg;
 }