From 88be8eca0b0a89535b403f4fca58e9889ba8e92a Mon Sep 17 00:00:00 2001 From: taeyoon Date: Tue, 1 Sep 2015 11:44:52 +0900 Subject: [PATCH] Revert "[3.0] Fix crash in wayland" This reverts commit a97df24246a11622772485c4f5bef73a5a161044. Change-Id: I22646d1a4a9ce184e613535cdfb5403100efb726 --- adaptors/tizen/framework-tizen.cpp | 8 ++------ adaptors/wayland/window-impl-wl.cpp | 2 -- adaptors/wayland/window-render-surface-wl.cpp | 18 ++++-------------- 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/adaptors/tizen/framework-tizen.cpp b/adaptors/tizen/framework-tizen.cpp index 7e52192..18f693d 100644 --- a/adaptors/tizen/framework-tizen.cpp +++ b/adaptors/tizen/framework-tizen.cpp @@ -26,7 +26,6 @@ #ifdef OVER_TIZEN_SDK_2_2 #include #include -#include #endif #include @@ -91,6 +90,8 @@ struct Framework::Impl #else mEventCallback.app_control = AppControl; + ui_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, AppBatteryLow, data); + ui_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, AppMemoryLow, data); ui_app_add_event_handler(&handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, AppDeviceRotated, data); ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, AppLanguageChanged, data); ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, AppRegionChanged, data); @@ -308,7 +309,6 @@ void Framework::Run() { DALI_LOG_ERROR("Framework::Run(), ui_app_main() is failed. err = %d", ret); } - #endif mRunning = false; @@ -316,11 +316,7 @@ void Framework::Run() void Framework::Quit() { -#ifndef OVER_TIZEN_SDK_2_2 app_efl_exit(); -#else - ui_app_exit(); -#endif } bool Framework::IsMainLoopRunning() diff --git a/adaptors/wayland/window-impl-wl.cpp b/adaptors/wayland/window-impl-wl.cpp index c3811f5..fc325ed 100644 --- a/adaptors/wayland/window-impl-wl.cpp +++ b/adaptors/wayland/window-impl-wl.cpp @@ -63,8 +63,6 @@ struct Window::EventHandler */ EventHandler( Window* window ) : mWindow( window ), - mWindowPropertyHandler( NULL ), - mClientMessagehandler( NULL ), mEcoreWindow( 0 ) { } diff --git a/adaptors/wayland/window-render-surface-wl.cpp b/adaptors/wayland/window-render-surface-wl.cpp index b5c07ad..f2d83ba 100644 --- a/adaptors/wayland/window-render-surface-wl.cpp +++ b/adaptors/wayland/window-render-surface-wl.cpp @@ -50,8 +50,7 @@ WindowRenderSurface::WindowRenderSurface( Dali::PositionSize positionSize, const std::string& name, bool isTransparent) : EcoreWlRenderSurface( positionSize, surface, name, isTransparent ), - mEglWindow( NULL ), - mNeedToApproveDeiconify( false ) + mNeedToApproveDeiconify(false) { DALI_LOG_INFO( gRenderSurfaceLogFilter, Debug::Verbose, "Creating Window\n" ); Init( surface ); @@ -59,12 +58,6 @@ WindowRenderSurface::WindowRenderSurface( Dali::PositionSize positionSize, WindowRenderSurface::~WindowRenderSurface() { - if( mEglWindow != NULL ) - { - wl_egl_window_destroy(mEglWindow); - mEglWindow = NULL; - } - if( mOwnSurface ) { ecore_wl_window_free( mWlWindow ); @@ -120,18 +113,15 @@ void WindowRenderSurface::DestroyEglSurface( EglInterface& eglIf ) Internal::Adaptor::EglImplementation& eglImpl = static_cast( eglIf ); eglImpl.DestroySurface(); + wl_egl_window_destroy(mEglWindow); + mEglWindow = NULL; } bool WindowRenderSurface::ReplaceEGLSurface( EglInterface& egl ) { DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter ); - if( mEglWindow != NULL ) - { - wl_egl_window_destroy(mEglWindow); - mEglWindow = NULL; - } - + wl_egl_window_destroy(mEglWindow); mEglWindow = wl_egl_window_create(ecore_wl_window_surface_get(mWlWindow), mPosition.width, mPosition.height); Internal::Adaptor::EglImplementation& eglImpl = static_cast( egl ); -- 2.7.4