Revert "[3.0] Added handler for ECORE_WL_EVENT_WINDOW_VISIBILITY_CHANGE" 05/143205/2 accepted/tizen/3.0/common/20170810.115148 accepted/tizen/3.0/ivi/20170809.222434 accepted/tizen/3.0/mobile/20170809.222423 accepted/tizen/3.0/wearable/20170809.222440 submit/tizen_3.0/20170809.062205
authortaeyoon0.lee <taeyoon0.lee@samsung.com>
Wed, 9 Aug 2017 05:16:56 +0000 (14:16 +0900)
committerTaeyoon Lee <taeyoon0.lee@samsung.com>
Wed, 9 Aug 2017 05:22:10 +0000 (05:22 +0000)
  This handler has the same issue with pause handler
  Each application should handle pause or visibility event

This reverts commit f737d284d3899479cbf86f7c52ffc70efde22665.

Change-Id: I66278ff1fee5c47ef7737d66e6f5c9bd050bff03

adaptors/ecore/wayland/window-impl-ecore-wl.cpp

index 96abe81..576e348 100644 (file)
@@ -64,7 +64,6 @@ struct Window::EventHandler
   : mWindow( window ),
     mWindowPropertyHandler( NULL ),
     mWindowIconifyStateHandler( NULL ),
-    mWindowVisibilityStateHandler( NULL ),
     mEcoreWindow( 0 )
   {
     // store ecore window handle
@@ -79,7 +78,6 @@ struct Window::EventHandler
     if( mWindow->mEcoreEventHander )
     {
       mWindowIconifyStateHandler = ecore_event_handler_add( ECORE_WL_EVENT_WINDOW_ICONIFY_STATE_CHANGE, EcoreEventWindowIconifyStateChanged, this );
-      mWindowVisibilityStateHandler = ecore_event_handler_add( ECORE_WL_EVENT_WINDOW_VISIBILITY_CHANGE, EcoreEventWindowVisibilityChanged, this );
     }
 #endif
 
@@ -94,16 +92,10 @@ struct Window::EventHandler
     {
       ecore_event_handler_del( mWindowPropertyHandler );
     }
-
     if ( mWindowIconifyStateHandler )
     {
       ecore_event_handler_del( mWindowIconifyStateHandler );
     }
-
-    if ( mWindowVisibilityStateHandler )
-    {
-      ecore_event_handler_del( mWindowVisibilityStateHandler );
-    }
   }
 
   // Static methods
@@ -143,43 +135,12 @@ struct Window::EventHandler
 
     return handled;
   }
-
-  /// Called when the window visibility is changed.
-  static Eina_Bool EcoreEventWindowVisibilityChanged( void* data, int type, void* event )
-  {
-    Ecore_Wl_Event_Window_Visibility_Change* visibilityChangedEvent( (Ecore_Wl_Event_Window_Visibility_Change*)event );
-    EventHandler* handler( (EventHandler*)data );
-    Eina_Bool handled( ECORE_CALLBACK_PASS_ON );
-
-    if ( handler && handler->mWindow )
-    {
-      WindowVisibilityObserver* observer( handler->mWindow->mAdaptor );
-      if ( observer && ( visibilityChangedEvent->win == (unsigned int) ecore_wl_window_id_get( handler->mEcoreWindow ) ) )
-      {
-        if( visibilityChangedEvent->fully_obscured == 1 )
-        {
-          observer->OnWindowHidden();
-          DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window (%d) full obscured\n", handler->mEcoreWindow );
-        }
-        else
-        {
-          observer->OnWindowShown();
-          DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window (%d) Shown\n", handler->mEcoreWindow );
-        }
-        handled = ECORE_CALLBACK_DONE;
-      }
-    }
-
-    return handled;
-  }
-
 #endif
 
   // Data
   Window* mWindow;
   Ecore_Event_Handler* mWindowPropertyHandler;
   Ecore_Event_Handler* mWindowIconifyStateHandler;
-  Ecore_Event_Handler* mWindowVisibilityStateHandler;
   Ecore_Wl_Window* mEcoreWindow;
 };