remote_surface: added new EAPIs to get/set the 'skip_save_img' property of E_Client submit/tizen_4.0/20171213.023320
authorGwanglim Lee <gl77.lee@samsung.com>
Mon, 11 Dec 2017 05:39:27 +0000 (14:39 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Wed, 13 Dec 2017 02:23:03 +0000 (11:23 +0900)
It enables sub-modules of the E to specify which windows should be excluded from saving
window image phase.

Change-Id: Ie0d684406b25e836ba9788e75f8f031d81faff65

src/bin/e_client.h
src/bin/e_comp_wl_rsm.c
src/bin/e_comp_wl_rsm.h

index 748f8d0de7dfc46e222213673a1fc0040f2585d0..ac3afe624397b60eaee7d618f0970dd91cc08376 100644 (file)
@@ -940,6 +940,7 @@ struct E_Client
    int effect_type;
    Eina_Bool use_splash : 1;
    Eina_Bool saved_img : 1; // indicates that window has been saved as the image file even once
+   Eina_Bool skip_save_img: 1; // indicates that window doesn't want to save its image file
 };
 
 #define e_client_focus_policy_click(ec) \
index cda84d873eeaec48ee175dfabddad9e2bef0dc72..fe6d8f8f369a1864b04265def4dc20eee069af9c 100644 (file)
@@ -2697,6 +2697,8 @@ err:
 static Eina_Bool
 _image_save_type_check(E_Client *ec)
 {
+   if (ec->skip_save_img) return EINA_FALSE;
+
    if (e_policy_client_is_lockscreen(ec) ||
        e_policy_client_is_home_screen(ec) ||
        e_policy_client_is_quickpanel(ec) ||
@@ -3270,6 +3272,21 @@ end:
 #endif /* HAVE_REMOTE_SURFACE */
 }
 
+EAPI void
+e_comp_wl_remote_surface_image_save_skip_set(E_Client *ec, Eina_Bool set)
+{
+   if (!e_config->save_win_buffer) return;
+   if (e_object_is_del(E_OBJECT(ec))) return;
+
+   ec->skip_save_img = set;
+}
+
+EAPI Eina_Bool
+e_comp_wl_remote_surface_image_save_skip_get(E_Client *ec)
+{
+   if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
+   return ec->skip_save_img;
+}
 
 EINTERN void
 e_comp_wl_remote_surface_debug_info_get(Eldbus_Message_Iter *iter)
index a02eba12652af1e6cedcbfe7643845d8b4ae88bb..83d60af57490f6a0ac3a93a03edaed6da04480c7 100644 (file)
@@ -8,6 +8,8 @@ EINTERN void      e_comp_wl_remote_surface_init(void);
 EINTERN void      e_comp_wl_remote_surface_shutdown(void);
 EINTERN Eina_Bool e_comp_wl_remote_surface_commit(E_Client *ec);
 EAPI    void      e_comp_wl_remote_surface_image_save(E_Client *ec);
+EAPI    void      e_comp_wl_remote_surface_image_save_skip_set(E_Client *ec, Eina_Bool set);
+EAPI    Eina_Bool e_comp_wl_remote_surface_image_save_skip_get(E_Client *ec);
 EINTERN void      e_comp_wl_remote_surface_debug_info_get(Eldbus_Message_Iter *iter);
 EAPI E_Client*    e_comp_wl_remote_surface_bound_provider_ec_get(E_Client *ec);