src/hbcore/inputfw/hbinputcontextproxy.cpp
changeset 28 b7da29130b0e
parent 21 4633027730f5
child 30 80e4d18b72f5
--- a/src/hbcore/inputfw/hbinputcontextproxy.cpp	Thu Sep 02 20:44:51 2010 +0300
+++ b/src/hbcore/inputfw/hbinputcontextproxy.cpp	Fri Sep 17 08:32:10 2010 +0300
@@ -31,6 +31,7 @@
 #include <hbinputmethod.h>
 #include <hbinputmethod_p.h>
 #include <hbinputsettingproxy.h>
+#include <hbinputmethodnull_p.h>
 
 /*!
 @alpha
@@ -113,7 +114,7 @@
 \reimp
 */
 bool HbInputContextProxy::filterEvent(const QEvent *event)
-{
+{    
     if (mTarget) {
         bool focusLocked = mTarget->d_func()->mFocusLocked;
         if (event->type() == QEvent::CloseSoftwareInputPanel && !focusLocked) {
@@ -165,6 +166,15 @@
             }
         }
         return mTarget->filterEvent(event);
+    } else {
+        if (event->type() == QEvent::RequestSoftwareInputPanel) {
+            // There is no mTarget. It means that someone is displaying something before
+            // the input framework was initialized. Acknowledge the situation so that
+            // the initializer knows to resend it. See HbApplication::initialize()
+            // method. The empty proxy is installed there.
+            HbInputMethodNull::Instance()->setDelayedPanelRequest(true);
+            return true;
+        }
     }
 
     return false;