Event blocking during view tansition effect showing. 96/62596/3
authorWoochan Lee <wc0917.lee@samsung.com>
Thu, 17 Mar 2016 02:32:08 +0000 (11:32 +0900)
committerWoochan Lee <wc0917.lee@samsung.com>
Thu, 17 Mar 2016 08:18:20 +0000 (17:18 +0900)
Change-Id: I27244556863bb3f8baf12462b13726bdb94ee65a

src/include/efl/mobile/ui_basic_view.h
src/include/efl/ui_view.h
src/lib/efl/mobile/ui_basic_view.cpp
src/lib/interface/ui_iface_viewmgr.cpp

index 297efb1..8b944bd 100644 (file)
@@ -34,6 +34,7 @@ protected:
        virtual void load();
        virtual void unload();
        virtual void unload_content();
+       virtual void set_event_block(bool block);
 
 public:
        ui_basic_view(ui_controller *controller, const char *name = NULL);
index dff9273..f9349e7 100644 (file)
@@ -84,6 +84,14 @@ protected:
         *  @return base layout of viewmgr.
         */
        Evas_Object *get_parent();
+
+       /** @brief toggle event block.
+        *
+        *  @note It makes internal conformant event freeze during effect showing.
+        *
+        *  @param block @c true, when blocking is enabled, otherwise @c false.
+        */
+       virtual void set_event_block(bool block) {}
 };
 
 }
index 3d8f93b..04c55fd 100644 (file)
@@ -264,3 +264,8 @@ void ui_basic_view::menu()
        if (!this->get_controller()) return;
        (dynamic_cast<ui_basic_controller *>(this->get_controller()))->menu();
 }
+
+void ui_basic_view::set_event_block(bool block)
+{
+       evas_object_freeze_events_set(this->get_base(), block);
+}
index 3cdfd77..5df0e2e 100644 (file)
@@ -52,7 +52,6 @@ bool ui_iface_viewmgr::disconnect_view(ui_iface_view *view)
 
 void ui_iface_viewmgr::set_event_block(ui_iface_view *view, bool block)
 {
-
        if (!ui_iface_viewmgr::event_block) return;
        view->set_event_block(block);
 }
@@ -149,7 +148,9 @@ ui_iface_viewmgr::push_view(ui_iface_view *view)
        }
 
        view->inactive();
-       this->set_event_block(view, true);
+
+       //FIXME: First view has no effect?
+       if (this->view_list.size() != 1) this->set_event_block(view, true);
 
        return view;
 }