From 5b72df93ded5c2f5dcbb8a1135ae9bc1937e0760 Mon Sep 17 00:00:00 2001 From: Sanjana Venkatachalam Date: Fri, 30 Dec 2016 14:51:29 +0530 Subject: [PATCH] Check web app's view mode when exiting fullscreen [Issue#] PLM P161223-02573 [Problem] Indicator is visible when user exits fullscreen after watching a video in Hotstar web app even if viewmodes="fullscreen" is mentioned in config.xml [Cause] When exit fullscreen callback is received, indicator is shown even if viewmode of webapp is fullscreen [Solution] Indicator is not shown if viewmode of webapp is fullscreen [Verification] 1) Build and install crosswalk-tizen rpm 2) Launch Hotstar webapp and play any video 3) Open fullscreen mode and exit fullscreen 4) Indicator should not be visible Change-Id: Ic7452d3da8f7e53ef4768b3f8ed619504fbc208e --- runtime/browser/native_window.cc | 7 ++++++- runtime/browser/native_window.h | 2 ++ runtime/browser/web_application.cc | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/runtime/browser/native_window.cc b/runtime/browser/native_window.cc index 5712dff..9350c66 100755 --- a/runtime/browser/native_window.cc +++ b/runtime/browser/native_window.cc @@ -72,6 +72,7 @@ NativeWindow::NativeWindow() : window_(NULL), window_type_(Type::NORMAL), initialized_(false), + currentViewModeFullScreen_(false), focus_(NULL), content_(NULL), rotation_(0), @@ -271,6 +272,10 @@ void NativeWindow::SetAutoRotation() { rotation_ = elm_win_rotation_get(window_); } +void NativeWindow::SetCurrentViewModeFullScreen(bool mode) { + currentViewModeFullScreen_ = mode; +} + void NativeWindow::Show() { evas_object_show(window_); } @@ -285,7 +290,7 @@ void NativeWindow::InActive() { void NativeWindow::FullScreen(bool enable) { elm_win_indicator_opacity_set(window_, - enable ? ELM_WIN_INDICATOR_TRANSPARENT : ELM_WIN_INDICATOR_OPAQUE); + (enable || currentViewModeFullScreen_) ? ELM_WIN_INDICATOR_TRANSPARENT : ELM_WIN_INDICATOR_OPAQUE); } #ifdef MANUAL_ROTATE_FEATURE_SUPPORT diff --git a/runtime/browser/native_window.h b/runtime/browser/native_window.h index e939a01..7d23aa0 100755 --- a/runtime/browser/native_window.h +++ b/runtime/browser/native_window.h @@ -50,6 +50,7 @@ class NativeWindow { void SetRotationLock(int degree); void SetRotationLock(ScreenOrientation orientation); void SetAutoRotation(); + void SetCurrentViewModeFullScreen(bool mode); int AddRotationHandler(RotationHandler handler); void RemoveRotationHandler(int id); int rotation() const { return rotation_; } @@ -78,6 +79,7 @@ class NativeWindow { void DidFocusChanged(bool got); bool initialized_; + bool currentViewModeFullScreen_; Evas_Object* focus_; Evas_Object* content_; int rotation_; diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 856c8ab..540b4e8 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -441,6 +441,7 @@ bool WebApplication::Initialize() { if (app_data_->widget_info() != NULL && app_data_->widget_info()->view_modes() == "fullscreen") { + window_->SetCurrentViewModeFullScreen(true); window_->FullScreen(true); } -- 2.7.4