policy: set the layer and the skip_iconify flag to the quickpanel and volume window 74/60774/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Wed, 2 Mar 2016 07:08:07 +0000 (16:08 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Wed, 2 Mar 2016 07:08:07 +0000 (16:08 +0900)
Change-Id: Ie5919cb06348e2e96ce20335d2af9c209e5c2b21

src/Makefile.am
src/e_mod_main.c
src/e_mod_private_data.h [new file with mode: 0755]
src/e_mod_quickpanel.c
src/e_mod_volume.c

index 91376d0..ea4089a 100644 (file)
@@ -47,6 +47,7 @@ module_la_SOURCES      = e_mod_config.c \
                          e_mod_keyboard.c \
                          e_mod_keyboard.h \
                          e_mod_stack.c \
+                         e_mod_private_data.h \
                          $(WL_SRC) \
                          $(ROT_SRC)
 
index 4b6d091..9a5f676 100644 (file)
@@ -118,7 +118,6 @@ _pol_client_normal_check(E_Client *ec)
 
    if (e_mod_pol_client_is_quickpanel(ec))
      {
-        ec->exp_iconify.skip_iconify = 1;
         evas_object_move(ec->frame, -10000, -10000);
         return EINA_FALSE;
      }
@@ -410,9 +409,6 @@ _pol_cb_hook_client_eval_post_fetch(void *d EINA_UNUSED, E_Client *ec)
    if (e_mod_pol_client_is_noti(ec))
      e_client_util_move_without_frame(ec, 0, 0);
 
-   if (e_mod_pol_client_is_volume(ec))
-     ec->exp_iconify.skip_iconify = 1;
-
    if (!_pol_client_normal_check(ec)) return;
 
    pd = eina_hash_find(hash_pol_desks, &ec->desk);
diff --git a/src/e_mod_private_data.h b/src/e_mod_private_data.h
new file mode 100755 (executable)
index 0000000..1ee8691
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef E_MOD_PRIVATE_DATA_H
+#define E_MOD_PRIVATE_DATA_H
+
+/* define layer values here */
+
+/* layer level - 999 */
+# define WM_POL_QUICKPANEL_LAYER  E_LAYER_CLIENT_ALERT
+# define WM_POL_TOAST_POPUP_LAYER E_LAYER_CLIENT_ALERT
+
+/* layer level - E_LAYER_CLIENT_NOTIFICATION_TOP (800) */
+# define WM_POL_VOLUME_LAYER      E_LAYER_CLIENT_NOTIFICATION_TOP
+
+/* layer level - E_LAYER_CLIENT_NOTIFICATION_HIGH (750) */
+/* layer level - E_LAYER_CLIENT_NOTIFICATION_NORMAL (700) */
+/* layer level - E_LAYER_CLIENT_NOTIFICATION_LOW (650) */
+
+/* layer level - E_LAYER_CLIENT_PRIO (600) */
+# define WM_POL_FLOATING_LAYER E_LAYER_CLIENT_PRIO
+
+/* layer level - E_LAYER_CLIENT_FULLSCREEN (350) */
+/* layer level - E_LAYER_CLIENT_ABOVE (250) */
+/* layer level - E_LAYER_CLIENT_NORMAL (200) */
+/* layer level - E_LAYER_CLIENT_BELOW (150) */
+
+#endif
index ffd4e70..1a134b0 100644 (file)
@@ -1,3 +1,4 @@
+#include "e_mod_private_data.h"
 #include "e_mod_main.h"
 #include "e_mod_quickpanel.h"
 #include "e_mod_indicator.h"
@@ -822,8 +823,15 @@ e_mod_quickpanel_client_set(E_Client *ec)
     * so we should unmaximize it to move object to out of screen. */
    e_client_unmaximize(ec, E_MAXIMIZE_BOTH);
 
-   /* stacking it on the lock_screen, set layer to notification-high. */
-   evas_object_layer_set(ec->frame, E_LAYER_CLIENT_NOTIFICATION_HIGH);
+   // set quickpanel layer
+   if (WM_POL_QUICKPANEL_LAYER != evas_object_layer_get(ec->frame))
+     {
+        evas_object_layer_set(ec->frame, WM_POL_QUICKPANEL_LAYER);
+     }
+   ec->layer = WM_POL_QUICKPANEL_LAYER;
+
+   // set skip iconify
+   ec->exp_iconify.skip_iconify = 1;
 
    /* since we unmaximized it,
     * so we should resize it directly as fullscreen. */
index 3ec49f2..b1960fb 100644 (file)
@@ -1,3 +1,4 @@
+#include "e_mod_private_data.h"
 #include "e_mod_volume.h"
 #include "e_mod_rotation.h"
 
@@ -275,6 +276,16 @@ e_mod_volume_client_set(E_Client *ec)
    _volume_del_hook =
       e_client_hook_add(E_CLIENT_HOOK_DEL, _volume_hook_client_del, NULL);
 
+   // set volume layer
+   if (WM_POL_VOLUME_LAYER != evas_object_layer_get(ec->frame))
+     {
+        evas_object_layer_set(ec->frame, WM_POL_VOLUME_LAYER);
+     }
+   ec->layer = WM_POL_VOLUME_LAYER;
+
+   // set skip iconify
+   ec->exp_iconify.skip_iconify = 1;
+
    return EINA_TRUE;
 }