+ Ecore_Wl_Event_Window_Iconify_State_Change* iconifyChangedEvent( static_cast< Ecore_Wl_Event_Window_Iconify_State_Change* >( event ) );
+ EventHandler* handler( static_cast< EventHandler* >( data ) );
+ Eina_Bool handled( ECORE_CALLBACK_PASS_ON );
+
+ if ( handler && handler->mWindow )
+ {
+ WindowVisibilityObserver* observer( handler->mWindow->mAdaptor );
+ if ( observer && ( iconifyChangedEvent->win == static_cast< unsigned int> ( ecore_wl_window_id_get( handler->mEcoreWindow ) ) ) )
+ {
+ if( iconifyChangedEvent->iconified == EINA_TRUE )
+ {
+ observer->OnWindowHidden();
+ DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window (%d) Iconfied\n", handler->mEcoreWindow );
+ }
+ else
+ {
+ observer->OnWindowShown();
+ DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window (%d) Shown\n", handler->mEcoreWindow );
+ }
+ handled = ECORE_CALLBACK_DONE;
+ }
+ }
+
+ return handled;
+ }
+
+ /// Called when the window gains focus
+ static Eina_Bool EcoreEventWindowFocusIn( void* data, int type, void* event )
+ {
+ Ecore_Wl_Event_Focus_In* focusInEvent( static_cast< Ecore_Wl_Event_Focus_In* >( event ) );
+ EventHandler* handler( static_cast< EventHandler* >( data ) );
+
+ if ( handler && handler->mWindow && focusInEvent->win == static_cast< unsigned int >( ecore_wl_window_id_get( handler->mEcoreWindow ) ) )
+ {
+ DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window EcoreEventWindowFocusIn\n" );
+
+ handler->mWindow->mFocusChangedSignal.Emit( true );
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ /// Called when the window loses focus
+ static Eina_Bool EcoreEventWindowFocusOut( void* data, int type, void* event )
+ {
+ Ecore_Wl_Event_Focus_Out* focusOutEvent( static_cast< Ecore_Wl_Event_Focus_Out* >( event ) );
+ EventHandler* handler( static_cast< EventHandler* >( data ) );
+
+ if ( handler && handler->mWindow && focusOutEvent->win == static_cast< unsigned int >(ecore_wl_window_id_get( handler->mEcoreWindow ) ) )
+ {
+ DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window EcoreEventWindowFocusOut\n" );
+
+ handler->mWindow->mFocusChangedSignal.Emit( false );
+ }
+
+ return ECORE_CALLBACK_PASS_ON;