Add the API which changes the window type
authorChoi Munseok <ms47.choi@samsung.com>
Wed, 10 Apr 2013 07:26:57 +0000 (16:26 +0900)
committerChoi Munseok <ms47.choi@samsung.com>
Wed, 10 Apr 2013 07:26:57 +0000 (16:26 +0900)
Change-Id: Id88009cc575114d74e59ec379e50ec9fd6a13062
Signed-off-by: Choi Munseok <ms47.choi@samsung.com>
src/ui/FUi_EcoreEvas.cpp
src/ui/FUi_Window.cpp
src/ui/inc/FUi_EcoreEvas.h

index ddbeb0a..e868ccc 100644 (file)
@@ -1865,6 +1865,23 @@ _EcoreEvas::IsWindowActivationEnabled(const _Window& window)
        return (acceptsFocus ? true : false);
 }
 
+void
+_EcoreEvas::SetWindowType(const _Window& window, int winType)
+{
+       _EflLayer* pLayer = GetEflLayer(window);
+       SysTryReturnVoidResult(NID_UI, pLayer, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer.");
+
+       Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas();
+       SysTryReturnVoidResult(NID_UI, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
+       Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas);
+
+       if (winType == _WINDOW_TYPE_SUB)
+       {
+               ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_UTILITY);
+       }
+}
+
 result
 _EcoreEvas::SetFloatingMode(const _Window& window, bool enable)
 {
index 97cb5b5..60f0c1e 100644 (file)
@@ -290,6 +290,7 @@ _Window::CreateRootVisualElement(_WindowType windowType)
        }
        else
        {
+               pEcoreEvas->SetWindowType(*this, _WINDOW_TYPE_SUB);
                SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x, UTILITY] Create.", GetNativeHandle());
        }
 #endif
index 41342cb..62279a8 100644 (file)
@@ -119,6 +119,7 @@ public:
        void SetWindowOrientationEnabled(const _Window& window, bool enable);
 #endif
 
+       void SetWindowType(const _Window& window, int winType);
        result SetFloatingMode(const _Window& window, bool enable);
        bool GetFloatingMode(const _Window& window) const;
        void SetWindowActivationEnabled(const _Window& window, bool enable);