quickpanel: fixed to send state chagned event of qp service only to qp clients which... 91/196991/2 accepted/tizen/unified/20190109.060108 submit/tizen/20190109.012349
authorGwanglim Lee <gl77.lee@samsung.com>
Tue, 8 Jan 2019 11:50:43 +0000 (20:50 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 8 Jan 2019 11:50:59 +0000 (11:50 +0000)
Change-Id: Iaec661340a6cbf1d9a661eadefa9ed29c6777c21

src/bin/e_policy_private_data.h
src/bin/e_policy_wl.c
src/bin/e_policy_wl.h
src/bin/services/e_service_quickpanel.c
src/bin/services/e_service_quickpanel.h

index 7ed3581ff169423907aa45e4a9aefcb56ca56e1f..139ffa960ad5ee619b6e2959c819fa5b5fe1a510 100644 (file)
@@ -61,4 +61,25 @@ e_policy_angle_get(E_Policy_Angle_Map map)
 /* layer level - E_LAYER_CLIENT_NORMAL (200) */
 /* layer level - E_LAYER_CLIENT_BELOW (150) */
 
+/* quickpanel related data types */
+typedef enum
+{
+   E_SERVICE_QUICKPANEL_TYPE_UNKNOWN        = 0x0, /* TZSH_QUICKPANEL_SERVICE_TYPE_UNKNOWN        */
+   E_SERVICE_QUICKPANEL_TYPE_SYSTEM_DEFAULT = 0x1, /* TZSH_QUICKPANEL_SERVICE_TYPE_SYSTEM_DEFAULT */
+   E_SERVICE_QUICKPANEL_TYPE_CONTEXT_MENU   = 0x2  /* TZSH_QUICKPANEL_SERVICE_TYPE_CONTEXT_MENU   */
+} E_Service_Quickpanel_Type;
+
+typedef enum
+{
+   E_QUICKPANEL_TYPE_UNKNOWN = 0,
+   E_QUICKPANEL_TYPE_SYSTEM_DEFAULT = 1,
+   E_QUICKPANEL_TYPE_CONTEXT_MENU = 2,
+} E_Quickpanel_Type;
+
+typedef enum
+{
+   E_QUICKPANEL_REGION_TYPE_HANDLER = 0,
+   E_QUICKPANEL_REGION_TYPE_CONTENTS = 1,
+} E_Quickpanel_Region_Type;
+
 #endif
index e02441837c15249c84e85b6f06107c234e22f0fb..a85600397accd967c878307719525a680a5fb42a 100644 (file)
@@ -4351,7 +4351,7 @@ _e_tzsh_qp_state_change_send(struct wl_resource *res_tzsh_client, int type, int
 }
 
 E_API void
-e_tzsh_qp_state_visible_update(E_Client *ec, Eina_Bool vis)
+e_tzsh_qp_state_visible_update(E_Client *ec, Eina_Bool vis, E_Quickpanel_Type type)
 {
    E_Policy_Wl_Tzsh_Client *tzsh_client;
    Eina_List *l;
@@ -4362,6 +4362,8 @@ e_tzsh_qp_state_visible_update(E_Client *ec, Eina_Bool vis)
 
    EINA_LIST_FOREACH(polwl->tzsh_clients, l, tzsh_client)
      {
+        /* check for type of qp */
+        if (tzsh_client->qp_type != type) continue;
         if (!tzsh_client->tzsh) continue;
         if (!tzsh_client->tzsh->ec) continue;
 
@@ -4387,7 +4389,7 @@ e_tzsh_qp_state_visible_update(E_Client *ec, Eina_Bool vis)
 }
 
 E_API void
-e_tzsh_qp_state_scrollable_update(E_Client *ec, Eina_Bool scrollable)
+e_tzsh_qp_state_scrollable_update(E_Client *ec, Eina_Bool scrollable, E_Quickpanel_Type type)
 {
    E_Policy_Wl_Tzsh_Client *tzsh_client;
    Eina_List *l;
@@ -4398,6 +4400,8 @@ e_tzsh_qp_state_scrollable_update(E_Client *ec, Eina_Bool scrollable)
 
    EINA_LIST_FOREACH(polwl->tzsh_clients, l, tzsh_client)
      {
+        /* check for type of qp */
+        if (tzsh_client->qp_type != type) continue;
         if (!tzsh_client->tzsh) continue;
         if (!tzsh_client->tzsh->ec) continue;
 
@@ -4423,7 +4427,7 @@ e_tzsh_qp_state_scrollable_update(E_Client *ec, Eina_Bool scrollable)
 }
 
 E_API void
-e_tzsh_qp_state_orientation_update(E_Client *ec, int ridx)
+e_tzsh_qp_state_orientation_update(E_Client *ec, int ridx, E_Quickpanel_Type type)
 {
    E_Policy_Wl_Tzsh_Client *tzsh_client;
    Eina_List *l;
@@ -4434,6 +4438,8 @@ e_tzsh_qp_state_orientation_update(E_Client *ec, int ridx)
 
    EINA_LIST_FOREACH(polwl->tzsh_clients, l, tzsh_client)
      {
+        /* check for type of qp */
+        if (tzsh_client->qp_type != type) continue;
         if (!tzsh_client->tzsh) continue;
         if (!tzsh_client->tzsh->ec) continue;
 
index b38c586662aec075b6f0a19190c9a0e573e5adbe..55e87dd6f073e1f95455fff044067058f8ff2746 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "config.h"
 #include <e.h>
+#include "e_policy_private_data.h"
 
 Eina_Bool e_policy_wl_init(void);
 void      e_policy_wl_shutdown(void);
@@ -44,9 +45,9 @@ E_API void      e_tzsh_extension_del(const char* name);
 
 
 /* tzsh quickpanel */
-E_API void e_tzsh_qp_state_visible_update(E_Client *ec, Eina_Bool vis);
-E_API void e_tzsh_qp_state_orientation_update(E_Client *ec, int ridx);
-E_API void e_tzsh_qp_state_scrollable_update(E_Client *ec, Eina_Bool scrollable);
+E_API void e_tzsh_qp_state_visible_update(E_Client *ec, Eina_Bool vis, E_Quickpanel_Type type);
+E_API void e_tzsh_qp_state_orientation_update(E_Client *ec, int ridx, E_Quickpanel_Type type);
+E_API void e_tzsh_qp_state_scrollable_update(E_Client *ec, Eina_Bool scrollable, E_Quickpanel_Type type);
 
 /* tzsh indicator */
 EINTERN void e_tzsh_indicator_srv_property_change_send(E_Client *ec, int angle);
index 00c100eb4f3af3e58f203bf95628fa75ed970636..85e3b9d6f772aaceb831607092b26cb58d89cffa 100644 (file)
@@ -564,7 +564,8 @@ _e_qp_srv_effect_finish_job_end(E_Policy_Quickpanel *qp)
      {
         if (qp->type == (E_Service_Quickpanel_Type)qp_client->type)
           e_tzsh_qp_state_visible_update(qp_client->ec,
-                                         qp->effect.final_visible_state);
+                                         qp->effect.final_visible_state,
+                                         qp_client->type);
      }
 
    focused = e_client_focused_get();
@@ -1545,7 +1546,8 @@ _quickpanel_cb_rotation_done(void *data, int type, void *event)
      {
         if (qp->type == (E_Service_Quickpanel_Type)qp_client->type)
           e_tzsh_qp_state_orientation_update(qp_client->ec,
-                                             qp->rotation);
+                                             qp->rotation,
+                                             qp_client->type);
      }
 
 end:
index 2db9401937c950ba7ad89d51e270526410431754..1e2694c779aae7bd65cbce99f6595fa6600f49f4 100644 (file)
@@ -13,26 +13,6 @@ typedef enum
    E_SERVICE_QUICKPANEL_EFFECT_TYPE_APP_CUSTOM = TZSH_QUICKPANEL_SERVICE_EFFECT_TYPE_APP_CUSTOM,
 } E_Service_Quickpanel_Effect_Type;
 
-typedef enum
-{
-   E_SERVICE_QUICKPANEL_TYPE_UNKNOWN        = 0x0, /* TZSH_QUICKPANEL_SERVICE_TYPE_UNKNOWN        */
-   E_SERVICE_QUICKPANEL_TYPE_SYSTEM_DEFAULT = 0x1, /* TZSH_QUICKPANEL_SERVICE_TYPE_SYSTEM_DEFAULT */
-   E_SERVICE_QUICKPANEL_TYPE_CONTEXT_MENU   = 0x2  /* TZSH_QUICKPANEL_SERVICE_TYPE_CONTEXT_MENU   */
-} E_Service_Quickpanel_Type;
-
-typedef enum
-{
-   E_QUICKPANEL_TYPE_UNKNOWN = 0,
-   E_QUICKPANEL_TYPE_SYSTEM_DEFAULT = 1,
-   E_QUICKPANEL_TYPE_CONTEXT_MENU = 2,
-} E_Quickpanel_Type;
-
-typedef enum
-{
-   E_QUICKPANEL_REGION_TYPE_HANDLER = 0,
-   E_QUICKPANEL_REGION_TYPE_CONTENTS = 1,
-} E_Quickpanel_Region_Type;
-
 struct _E_QP_Mgr_Funcs
 {
    void      (*quickpanel_client_add)(E_Client *ec, E_Service_Quickpanel_Type type);