From 828746c33cca53fc971747db67a3848157f3986d Mon Sep 17 00:00:00 2001 From: Shao Changbin Date: Thu, 31 Jan 2013 04:21:01 -0500 Subject: [PATCH] fix the issue that web app can't rotate [Issue#] TDIS-1063 [Bug] Web app is not able to rotate when rotation sensor is enabled. [Cause] screen rotation callback is not registered in wrt [Solution] set orientation callback for ewk view Change-Id: I521e266a625c7b4bec2d8a1bc93db37f3ae5e9b2 --- src/view/webkit/view_logic.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/view/webkit/view_logic.cpp b/src/view/webkit/view_logic.cpp index caa04f1..b9e11ff 100755 --- a/src/view/webkit/view_logic.cpp +++ b/src/view/webkit/view_logic.cpp @@ -569,6 +569,11 @@ void ViewLogic::ewkClientInit(Evas_Object *wkView) { it->second, this); } + // EWK Orientation Callback + ewk_view_orientation_lock_callback_set( + wkView, + orientationLockCallback, + this); } void ViewLogic::ewkClientDeinit(Evas_Object *wkView) { @@ -581,6 +586,10 @@ void ViewLogic::ewkClientDeinit(Evas_Object *wkView) { it->first.c_str(), it->second); } + ewk_view_orientation_lock_callback_set( + wkView, + NULL, + NULL); } bool ViewLogic::createEwkView(Evas* canvas) -- 2.7.4