, __keyInfo(keyState, keyCode, keyModifier, pUserData)
{
__pTarget = GetTarget(keyCode);
+ if (IsNativeWindowActivated(__pTarget) == false)
+ {
+ SysTryReturnVoidResult(NID_UI, IsNativeWindowActivated(__pTarget), E_SYSTEM, "[E_SYSTEM] NativeWindow is not activated yet");
+ }
}
virtual ~_KeyEvent(void)
return pControl;
}
+ bool
+ IsNativeWindowActivated(_Control* pControl)
+ {
+ bool nativeWindowActivated = false;
+ _Control* pParent = pControl;
+
+ while (pParent)
+ {
+ _Window* pWindow = dynamic_cast<_Window*>(pParent);
+ if (pWindow
+ && (pWindow->GetNativeWindowActivated() == true || (pWindow->GetNativeWindowActivated() == false && pWindow->GetWindowType() == _WINDOW_TYPE_VE)))
+ {
+ nativeWindowActivated = true;
+ break;
+ }
+
+ pParent = pParent->GetParent();
+ }
+ return nativeWindowActivated;
+ }
+
private:
_Control* __pTarget;
_KeyInfo __keyInfo;
}
_KeyEvent event(KEY_PRESSED, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers), pEv);
+ result r = GetLastResult();
+ if (r != E_SUCCESS)
+ {
+ SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r));
+ return ECORE_CALLBACK_PASS_ON;
+ }
SysSecureLog(NID_UI, "KeyName = %s, KeyCode = %d, KeyModifier = %x", pEv->keyname, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers));
event.Send();
}
_KeyEvent event(KEY_RELEASED, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers), pEv);
+ result r = GetLastResult();
+ if (r != E_SUCCESS)
+ {
+ SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r));
+ return ECORE_CALLBACK_PASS_ON;
+ }
SysSecureLog(NID_UI, "KeyName = %s, KeyCode = %d, KeyModifier = %x", pEv->keyname, _KeyEvent::GetKeyCode(pEv->keyname), _KeyEvent::GetKeyModifier(pEv->modifiers));
event.Send();
return enable;
}
+void
+_Window::SetNativeWindowActivated(bool activated)
+{
+ __nativeWindowActivated = activated;
+}
+
+bool
+_Window::GetNativeWindowActivated(void)
+{
+ return __nativeWindowActivated;
+}
+
_RootVisualElement*
_Window::GetRootVisualElement(void) const
{
obscured = pObscured->ToInt();
if (obscured == 0)
{
+ SetNativeWindowActivated(true);
GetWindowDelegate().OnNativeWindowActivated();
}
+ else
+ {
+ SetNativeWindowActivated(false);
+ }
pArgs->RemoveAll(true);
delete pArgs;
, __rotation(-1)
, __preferredRotation(false)
, __orientationCallbackMode(false)
+ , __nativeWindowActivated(false)
{
SetControlDelegate(*this);
SetWindowDelegate(*this);
void SetActivationEnabled(bool enable);
bool IsActivationEnabled(void);
+ void SetNativeWindowActivated(bool activated);
+ bool GetNativeWindowActivated(void);
Tizen::Ui::Animations::_RootVisualElement* GetRootVisualElement(void) const;
NativeWindowHandle GetNativeHandle(void) const;
_Control* __pOwner;
_IWindowDelegate* __pWindowDelegate;
bool __activated;
+ bool __nativeWindowActivated;
bool __destroying;
Tizen::Ui::Animations::_RootVisualElement* __pRootVisualElement;