src/hbcore/inputfw/hbinputcontextproxy.cpp
changeset 21 4633027730f5
parent 7 923ff622b8b9
child 28 b7da29130b0e
--- a/src/hbcore/inputfw/hbinputcontextproxy.cpp	Tue Jul 06 14:36:53 2010 +0300
+++ b/src/hbcore/inputfw/hbinputcontextproxy.cpp	Wed Aug 18 10:05:37 2010 +0300
@@ -29,6 +29,7 @@
 #include <QGraphicsProxyWidget>
 #include <QGraphicsView>
 #include <hbinputmethod.h>
+#include <hbinputmethod_p.h>
 #include <hbinputsettingproxy.h>
 
 /*!
@@ -102,7 +103,7 @@
                 // Already focused to given widget.                 
                 return;
             } 
-            mTarget->setFocusObject(new HbInputFocusObject(widget));
+            mTarget->setFocusObject(mTarget->d_func()->createAndSetupFocusObject(widget));
         }
     }
 }
@@ -114,11 +115,11 @@
 bool HbInputContextProxy::filterEvent(const QEvent *event)
 {
     if (mTarget) {
-        bool orientationCompleted = HbInputSettingProxy::instance()->orientationChangeCompleted();
-        if (event->type() == QEvent::CloseSoftwareInputPanel && orientationCompleted) {
+        bool focusLocked = mTarget->d_func()->mFocusLocked;
+        if (event->type() == QEvent::CloseSoftwareInputPanel && !focusLocked) {
             setInputFrameworkFocus(0);
             return true;
-        } else if (event->type() == QEvent::RequestSoftwareInputPanel && orientationCompleted) {
+        } else if (event->type() == QEvent::RequestSoftwareInputPanel && !focusLocked) {
             if (QWidget *focusedWidget =  qApp->focusWidget()) {
                 // see if the focused widget is graphics view, if so get the focused graphics item in the view
                 // and acivate inputmethod for the focused graphics item