e_client: added E_Transient to support various transient_fortype 51/45351/2
authorMinJeong Kim <minjjj.kim@samsung.com>
Wed, 5 Aug 2015 05:52:29 +0000 (14:52 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Wed, 5 Aug 2015 12:52:40 +0000 (05:52 -0700)
- The enum E_Transient indicates transient_for type.

  E_TRANSIENT_ABOVE : stack a client above its parent
  E_TRANSIENT_BELOW : stack a client below its parent
- Restack transients with transient_policy

Change-Id: I433927c7504f46bc13ac2a68fa380581e170fcfd
Signed-off-by: MinJeong Kim <minjjj.kim@samsung.com>
src/bin/e_client.c
src/bin/e_client.h

index b5106d7428506ea92a9238762a5222daa75d35cd..664fd0502d54af15357e62a07f1ce128f9055027 100644 (file)
@@ -1498,7 +1498,7 @@ _e_client_cb_evas_restack(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA
    if (e_config->transient.raise && ec->transients)
      {
         Eina_List *list = eina_list_clone(ec->transients);
-        E_Client *child, *below = NULL;
+        E_Client *child, *below = NULL, *above = NULL;
 
         E_LIST_REVERSE_FREE(list, child)
           {
@@ -1506,11 +1506,23 @@ _e_client_cb_evas_restack(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA
               * thats another option.
               */
              if (child->iconic) continue;
-             if (below)
-               evas_object_stack_below(child->frame, below->frame);
-             else
-               evas_object_stack_above(child->frame, ec->frame);
-             below = child;
+             if (child->transient_policy == E_TRANSIENT_ABOVE)
+               {
+                  if (below)
+                    evas_object_stack_below(child->frame, below->frame);
+                  else
+                    evas_object_stack_above(child->frame, ec->frame);
+                  below = child;
+               }
+             else if (child->transient_policy == E_TRANSIENT_BELOW)
+               {
+                  if (above)
+                    evas_object_stack_above(child->frame, above->frame);
+                  else
+                    evas_object_stack_below(child->frame, ec->frame);
+                  above = child;
+               }
+
           }
      }
    if (ec->unredirected_single) return;
index 02a65a9731429c9f68ac0838ea2bdd403cebf2f0..16bacdc707e526fe9fc3d4eec40e34716531f93c 100644 (file)
@@ -116,6 +116,12 @@ typedef enum _E_Fullscreen
    E_FULLSCREEN_ZOOM
 } E_Fullscreen;
 
+typedef enum _E_Transient
+{
+   E_TRANSIENT_ABOVE,
+   E_TRANSIENT_BELOW,
+} E_Transient;
+
 typedef enum _E_Window_Placement
 {
    E_WINDOW_PLACEMENT_SMART,
@@ -684,6 +690,7 @@ struct E_Client
    unsigned int       user_skip_winlist : 1;
    E_Maximize         maximized;
    E_Fullscreen       fullscreen_policy;
+   E_Transient        transient_policy;
    unsigned int       borderless : 1;
    unsigned char      offer_resistance : 1;
    Eina_Stringshare  *bordername;