X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=adaptors%2Fecore%2Fwayland%2Fwindow-impl-ecore-wl.cpp;h=6a71e003b8119bd39b1403f2ef57a232909f55e0;hb=refs%2Fchanges%2F89%2F151389%2F2;hp=6f9b2a794a9eaa4a7fb634ed1488f815779c9dba;hpb=f6feca16511c154f683895b3315974e399e7c13a;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/adaptors/ecore/wayland/window-impl-ecore-wl.cpp b/adaptors/ecore/wayland/window-impl-ecore-wl.cpp index 6f9b2a7..6a71e00 100644 --- a/adaptors/ecore/wayland/window-impl-ecore-wl.cpp +++ b/adaptors/ecore/wayland/window-impl-ecore-wl.cpp @@ -95,7 +95,6 @@ struct Window::EventHandler if( mWindow->mEcoreEventHander ) { mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_WINDOW_ICONIFY_STATE_CHANGE, EcoreEventWindowIconifyStateChanged, this ) ); - mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_WINDOW_VISIBILITY_CHANGE, EcoreEventWindowVisibilityChanged, this ) ); mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_FOCUS_IN, EcoreEventWindowFocusIn, this ) ); mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_FOCUS_OUT, EcoreEventWindowFocusOut, this ) ); mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_OUTPUT_TRANSFORM, EcoreEventOutputTransform, this) ); @@ -171,35 +170,6 @@ 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( static_cast< Ecore_Wl_Event_Window_Visibility_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 && ( visibilityChangedEvent->win == static_cast< 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; - } - /// Called when the window gains focus static Eina_Bool EcoreEventWindowFocusIn( void* data, int type, void* event ) { @@ -241,7 +211,10 @@ struct Window::EventHandler if ( handler && handler->mWindow && transformEvent->output == ecore_wl_window_output_find( handler->mEcoreWindow ) ) { ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( handler->mWindow->mSurface ) ); - wlSurface->OutputTransformed(); + if( wlSurface ) + { + wlSurface->OutputTransformed(); + } } return ECORE_CALLBACK_PASS_ON; @@ -256,7 +229,10 @@ struct Window::EventHandler if ( handler && handler->mWindow && ignoreTransformEvent->win == handler->mEcoreWindow ) { ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( handler->mWindow->mSurface ) ); - wlSurface->OutputTransformed(); + if( wlSurface ) + { + wlSurface->OutputTransformed(); + } } return ECORE_CALLBACK_PASS_ON; @@ -907,7 +883,10 @@ bool Window::IsVisible() const void Window::RotationDone( int orientation, int width, int height ) { ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( mSurface ) ); - wlSurface->RequestRotation( orientation, width, height ); + if( wlSurface ) + { + wlSurface->RequestRotation( orientation, width, height ); + } mAdaptor->SurfaceResizePrepare( Dali::Adaptor::SurfaceSize( width, height ) ); @@ -1491,7 +1470,10 @@ Dali::DevelWindow::WindowPosition Window::GetPosition() void Window::SetTransparency( bool transparent ) { ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( mSurface ) ); - wlSurface->SetTransparency( transparent ); + if( wlSurface ) + { + wlSurface->SetTransparency( transparent ); + } } } // Adaptor