From e84d1b280ccad944183a75c7a6ccabe0ffdd2bcb Mon Sep 17 00:00:00 2001 From: Robert Jadczak Date: Mon, 9 Feb 2015 17:53:10 +0100 Subject: [PATCH] Auto context detection popup does not appear Added creating popup on existing webview window insted of creating new window. Reviewed by: DONGJUN KiM, Piotr Grad Change-Id: I1dc1d4472ae7029e22fe8c5efd6c9bfda69b5d3e Signed-off-by: Robert Jadczak --- tizen_src/impl/popup_controller_efl.cc | 38 ++-------------------------------- tizen_src/impl/popup_controller_efl.h | 1 - 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/tizen_src/impl/popup_controller_efl.cc b/tizen_src/impl/popup_controller_efl.cc index fedd494..f596ded 100644 --- a/tizen_src/impl/popup_controller_efl.cc +++ b/tizen_src/impl/popup_controller_efl.cc @@ -129,7 +129,6 @@ void PopupControllerEfl::itemSelected( PopupControllerEfl::PopupControllerEfl(EWebView* webView) : web_view_(webView), top_widget_(NULL), - widget_win_(NULL), popup_(NULL), content_type_(UNKNOWN) { } @@ -202,39 +201,12 @@ void PopupControllerEfl::addOptions() { } bool PopupControllerEfl::createPopup() { - top_widget_ = elm_object_top_widget_get( - elm_object_parent_widget_get(web_view_->evas_object())); + top_widget_ = web_view_->evas_object(); if (!top_widget_) - top_widget_ = web_view_->evas_object(); - - evas_object_data_set(top_widget_, "PopupControllerEfl", this); - widget_win_ = elm_win_add(top_widget_, "Blink Center Popup", ELM_WIN_BASIC); - if (!widget_win_) return false; - elm_win_alpha_set(widget_win_, EINA_TRUE); - - ecore_x_icccm_name_class_set( - elm_win_xwindow_get(widget_win_), - "APP_POPUP", - "APP_POPUP"); - -#ifdef OS_TIZEN - if (elm_win_wm_rotation_supported_get(top_widget_)) { - int preferredrotation = elm_win_wm_rotation_preferred_rotation_get( - top_widget_); - if (preferredrotation == -1) { - int rots[4] = {0, 90, 180, 270}; - elm_win_wm_rotation_available_rotations_set(widget_win_, rots, 4); - } else { - elm_win_wm_rotation_available_rotations_set( - widget_win_, &preferredrotation, 1); - } - } -#endif - - popup_ = elm_popup_add(widget_win_); + popup_ = elm_popup_add(top_widget_); if (!popup_) return false; @@ -286,7 +258,6 @@ void PopupControllerEfl::addCallbacks() { void PopupControllerEfl::showPopup() { evas_object_show(popup_); - evas_object_show(widget_win_); } void PopupControllerEfl::closePopup() { @@ -298,11 +269,6 @@ void PopupControllerEfl::closePopup() { evas_object_del(popup_); popup_ = NULL; } - - if (widget_win_) { - evas_object_hide(widget_win_); - widget_win_ = NULL; - } } } //namespace diff --git a/tizen_src/impl/popup_controller_efl.h b/tizen_src/impl/popup_controller_efl.h index e9951d1..6d139fe 100644 --- a/tizen_src/impl/popup_controller_efl.h +++ b/tizen_src/impl/popup_controller_efl.h @@ -51,7 +51,6 @@ class PopupControllerEfl { EWebView* web_view_; Evas_Object* top_widget_; - Evas_Object* widget_win_; Evas_Object* popup_; Content_Type content_type_; std::string content_; -- 2.7.4