Fix Ime Rotation
authorChoi Munseok <ms47.choi@samsung.com>
Thu, 11 Apr 2013 16:17:07 +0000 (01:17 +0900)
committerChoi Munseok <ms47.choi@samsung.com>
Thu, 11 Apr 2013 16:17:07 +0000 (01:17 +0900)
Change-Id: I5f6f71034772793d349cfddf0d60cda0a2ffd168
Signed-off-by: Choi Munseok <ms47.choi@samsung.com>
src/ui/FUi_EcoreEvas.cpp

index 5fe23d0..6d6108e 100644 (file)
@@ -51,6 +51,8 @@
 #include "FUiAnim_RootVisualElement.h"
 #include "FUiAnim_DisplayManager.h"
 #include "FUiCtrl_Frame.h"
+#include "FUiCtrl_FrameImpl.h"
+#include "FUiCtrl_FormImpl.h"
 #include "FUi_Clipboard.h"
 #include "FUi_TouchManager.h"
 #include "FUi_ControlManager.h"
@@ -486,6 +488,43 @@ OnClientMessageReceived(void* pData, int type, void* pEvent)
                }
        }
 
+       if (pClientEvent->message_type == ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST)
+       {
+               SysLog(NID_UI, "[Ime Rotation]");
+
+               _Window* pWindow = pControlManager->GetCurrentFrame();
+               if (pWindow)
+               {
+                       NativeWindowHandle handle = pWindow->GetNativeHandle();
+
+                       if (pClientEvent->win == handle)
+                       {
+                               int angle = pClientEvent->data.l[1];
+                               SysLog(NID_UI, "[Ime Rotation] Receive the client message(xid = 0x%x, angle = %d)", handle, angle);
+
+                               _Frame* pFrame = dynamic_cast<_Frame*>(pWindow);
+                               
+                               if (pFrame)
+                               {
+                                       _FrameImpl* pFrameImpl = static_cast<Controls::_FrameImpl*>(pFrame->GetUserData());
+                                       if (pFrameImpl)
+                                       {
+                                               _FormImpl* pCurrentFormImpl = pFrameImpl->GetCurrentForm();
+
+                                               if (pCurrentFormImpl)
+                                               {
+                                                       pCurrentFormImpl->UpdateOrientation(angle);
+                                               }
+                                               else
+                                               {
+                                                       pFrameImpl->UpdateOrientation(angle);
+                                               }
+                                       }
+                               }
+                       }
+               }
+       }
+
        return ECORE_CALLBACK_RENEW;
 }