remote_surface: added new EAPIs to get/set the 'skip_save_img' property of E_Client 15/163415/2 accepted/tizen/unified/20171213.153241 submit/tizen/20171213.023423
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:12:28 +0000 (02:12 +0000)
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 395a4b4..052d593 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 08a3bb0..cbe00a9 100644 (file)
@@ -2700,6 +2700,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) ||
@@ -3277,6 +3279,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 a02eba1..83d60af 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);