fixup! Set RenderWidgetHostImpl visibility depending on presence application on screen
authorPiotr Tworek <p.tworek@samsung.com>
Mon, 9 Feb 2015 14:34:16 +0000 (15:34 +0100)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
The code makes sense on Mobile/TV where the application always occupies
the whole screen. In case of desktop where mutiple windows can be seen
at the same time, not so much. After the patch whenever the window is
unfocused its content disappears.
Reviewed by: Antonio Gomes, Kamil Klimek, SeungSeop Park, arno renevier

Change-Id: I021b09543d5143e8ed91c9a362d7ce4e16727a61
Signed-off-by: Piotr Tworek <p.tworek@samsung.com>
tizen_src/ewk/efl_integration/private/ewk_view_private.cc

index ff1527a0272605af6c5ee3f35069dab4fcf4a1e2..815eb050d6ac7ba1697fdac168f6faacd582c6d5 100644 (file)
@@ -255,6 +255,7 @@ unsigned long long handleExceededDatabaseQuota(Ewk_View_Smart_Data *sd, const ch
   return EINA_FALSE;
 }
 
+#if defined(OS_TIZEN)
 void _cb_was_shown(void *data, Evas *obj, void *event_info)
 {
   handleEvasObjectShow(static_cast<Evas_Object*>(data));
@@ -264,6 +265,7 @@ void _cb_was_hidden(void *data, Evas *obj, void *event_info)
 {
   handleEvasObjectHide(static_cast<Evas_Object*>(data));
 }
+#endif
 
 } // namespace
 
@@ -351,9 +353,11 @@ Evas_Object* CreateWebViewAsEvasObject(Ewk_Context* context,
   sd->priv = new EwkViewImpl(view);
   view->Initialize();
 
+#if defined(OS_TIZEN)
   // set callbacks to handle application presence/absence on screen
   evas_event_callback_add(canvas, EVAS_CALLBACK_CANVAS_FOCUS_IN,  _cb_was_shown,  wv_evas_object);
   evas_event_callback_add(canvas, EVAS_CALLBACK_CANVAS_FOCUS_OUT, _cb_was_hidden, wv_evas_object);
+#endif
 
   return wv_evas_object;
 }