ginebra2/Application.cpp
changeset 10 232fbd5a2dcb
parent 5 0f2326c2a325
child 12 afcd8e6d025b
--- a/ginebra2/Application.cpp	Tue Jul 06 14:03:49 2010 +0300
+++ b/ginebra2/Application.cpp	Wed Aug 18 09:37:05 2010 +0300
@@ -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;
 }