src/hbcore/inputfw/hbinputcontextproxy.cpp
changeset 28 b7da29130b0e
parent 21 4633027730f5
child 30 80e4d18b72f5
equal deleted inserted replaced
23:e6ad4ef83b23 28:b7da29130b0e
    29 #include <QGraphicsProxyWidget>
    29 #include <QGraphicsProxyWidget>
    30 #include <QGraphicsView>
    30 #include <QGraphicsView>
    31 #include <hbinputmethod.h>
    31 #include <hbinputmethod.h>
    32 #include <hbinputmethod_p.h>
    32 #include <hbinputmethod_p.h>
    33 #include <hbinputsettingproxy.h>
    33 #include <hbinputsettingproxy.h>
       
    34 #include <hbinputmethodnull_p.h>
    34 
    35 
    35 /*!
    36 /*!
    36 @alpha
    37 @alpha
    37 @hbcore
    38 @hbcore
    38 \class HbInputContextProxy
    39 \class HbInputContextProxy
   111 /*!
   112 /*!
   112 \internal
   113 \internal
   113 \reimp
   114 \reimp
   114 */
   115 */
   115 bool HbInputContextProxy::filterEvent(const QEvent *event)
   116 bool HbInputContextProxy::filterEvent(const QEvent *event)
   116 {
   117 {    
   117     if (mTarget) {
   118     if (mTarget) {
   118         bool focusLocked = mTarget->d_func()->mFocusLocked;
   119         bool focusLocked = mTarget->d_func()->mFocusLocked;
   119         if (event->type() == QEvent::CloseSoftwareInputPanel && !focusLocked) {
   120         if (event->type() == QEvent::CloseSoftwareInputPanel && !focusLocked) {
   120             setInputFrameworkFocus(0);
   121             setInputFrameworkFocus(0);
   121             return true;
   122             return true;
   163             if (Qt::Key_unknown == keyEvent->key()) {
   164             if (Qt::Key_unknown == keyEvent->key()) {
   164                 return false;
   165                 return false;
   165             }
   166             }
   166         }
   167         }
   167         return mTarget->filterEvent(event);
   168         return mTarget->filterEvent(event);
       
   169     } else {
       
   170         if (event->type() == QEvent::RequestSoftwareInputPanel) {
       
   171             // There is no mTarget. It means that someone is displaying something before
       
   172             // the input framework was initialized. Acknowledge the situation so that
       
   173             // the initializer knows to resend it. See HbApplication::initialize()
       
   174             // method. The empty proxy is installed there.
       
   175             HbInputMethodNull::Instance()->setDelayedPanelRequest(true);
       
   176             return true;
       
   177         }
   168     }
   178     }
   169 
   179 
   170     return false;
   180     return false;
   171 }
   181 }
   172 
   182