src/hbplugins/inputmethods/common/hbinputspellquerydialog.cpp
changeset 21 4633027730f5
parent 7 923ff622b8b9
child 28 b7da29130b0e
--- a/src/hbplugins/inputmethods/common/hbinputspellquerydialog.cpp	Tue Jul 06 14:36:53 2010 +0300
+++ b/src/hbplugins/inputmethods/common/hbinputspellquerydialog.cpp	Wed Aug 18 10:05:37 2010 +0300
@@ -35,6 +35,7 @@
 #include <hbinstance.h>
 #include <hbeffect.h>
 #include <hbinputregioncollector_p.h>
+#include <hbinputmainwindow_p.h>
 
 #include "hbinputspellquerydialog.h"
 #include "hbinputmodehandler.h"
@@ -93,7 +94,7 @@
     mSavedFocusObject = focusObject->object();
     mSavedEditorText = editorText;
     mDidHandleFinish = false;
-    mainWindow()->setProperty("SpellQueryLaunched", true);
+    HbInputMainWindow::instance()->lockFocus();
     open(this,SLOT(dialogClosed(HbAction*)));
     mPrimaryAction = qobject_cast<HbAction*>(actions().first());
 
@@ -108,7 +109,6 @@
 
 void HbInputSpellQuery::dialogClosed(HbAction* action)
 {
-    mainWindow()->setProperty("SpellQueryLaunched", false);
     //There are multiple dialog closed event received. This will make sure we handle finish
     //only once
     if(mDidHandleFinish) {
@@ -133,7 +133,9 @@
     HbEffect::disable(this);
     hide();
     HbEffect::enable(this);  
-
+    
+    HbInputMainWindow::instance()->unlockFocus();
+    
     mPredictionHandler->spellQueryDialogClosed(mSavedFocusObject,closeReason,string);
     mSavedFocusObject = 0;
     mSavedEditorText.clear();