e_client: added code to handle e_client's exp_iconify information 30/52730/4 accepted/tizen/mobile/20151202.040550 accepted/tizen/tv/20151202.040614 accepted/tizen/wearable/20151202.040648 submit/tizen/20151201.232720
authorDoyoun Kang <doyoun.kang@samsung.com>
Thu, 26 Nov 2015 08:45:03 +0000 (17:45 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 1 Dec 2015 23:12:02 +0000 (15:12 -0800)
Change-Id: I7c3e8223d9f6b4935d21ce43cb790bbff8ab4538

src/bin/e_client.c
src/bin/e_client.h
src/bin/e_comp_x.c
src/bin/e_hints.c

index 70124af..98f92bc 100644 (file)
@@ -3067,7 +3067,7 @@ e_client_new(E_Comp *c EINA_UNUSED, E_Pixmap *cp, int first_map, int internal)
    ec->new_client = 1;
    ec->comp->new_clients++;
 
-   ec->exp_iconify.by_visibility = 0;
+   ec->exp_iconify.by_client = 0;
    ec->exp_iconify.not_raise = 0;
    ec->exp_iconify.use_resize = 0;
 
@@ -4113,6 +4113,10 @@ e_client_activate(E_Client *ec, Eina_Bool just_do_it)
           (e_config->focus_setting == E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED)))) ||
        (just_do_it))
      {
+        ELOG("Un-Set ICONIFY BY CLIENT", ec->pixmap, ec);
+        ec->exp_iconify.by_client = 0;
+        ec->exp_iconify.not_raise = 0;
+
         if (ec->iconic)
           {
              if (e_config->clientlist_warp_to_iconified_desktop == 1)
@@ -4548,9 +4552,9 @@ e_client_iconify(E_Client *ec)
    E_OBJECT_CHECK(ec);
    E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE);
 
-   ELOGF("TZVIS", "ICONIFY  |not_raise:%d       |by_vis:%d",
+   ELOGF("TZVIS", "ICONIFY  |not_raise:%d       |by_client:%d",
          ec->pixmap, ec, (unsigned int)ec->exp_iconify.not_raise,
-         ec->exp_iconify.by_visibility);
+         ec->exp_iconify.by_client);
 
    if (ec->shading || ec->iconic) return;
    ec->iconic = 1;
@@ -4571,18 +4575,12 @@ e_client_iconify(E_Client *ec)
 
    if (e_config->transient.iconify)
      {
-        Eina_Bool not_raise;
         E_Client *child;
         Eina_List *list = eina_list_clone(ec->transients);
 
-        not_raise = ec->exp_iconify.not_raise;
         EINA_LIST_FREE(list, child)
-          {
-             child->exp_iconify.not_raise = not_raise;
-             e_client_iconify(child);
-          }
+          e_client_iconify(child);
      }
-   ec->exp_iconify.not_raise = EINA_FALSE;
    e_remember_update(ec);
 }
 
@@ -4590,18 +4588,20 @@ EAPI void
 e_client_uniconify(E_Client *ec)
 {
    E_Desk *desk;
+   Eina_Bool not_raise;
 
    E_OBJECT_CHECK(ec);
    E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE);
 
-   ELOGF("TZVIS", "UNICONIFY|not_raise:%d       |by_vis:%d",
+   ELOGF("TZVIS", "UNICONIFY|not_raise:%d       |by_client:%d",
          ec->pixmap, ec, (unsigned int)ec->exp_iconify.not_raise,
-         ec->exp_iconify.by_visibility);
+         ec->exp_iconify.by_client);
 
    if (ec->shading || (!ec->iconic)) return;
    desk = e_desk_current_get(ec->desk->zone);
    e_client_desk_set(ec, desk);
-   if (!ec->exp_iconify.not_raise)
+   not_raise = ec->exp_iconify.not_raise;
+   if (!not_raise)
      evas_object_raise(ec->frame);
    evas_object_show(ec->frame);
    e_client_comp_hidden_set(ec, 0);
@@ -4616,8 +4616,13 @@ e_client_uniconify(E_Client *ec)
         Eina_List *list = eina_list_clone(ec->transients);
 
         EINA_LIST_FREE(list, child)
-          e_client_uniconify(child);
+          {
+             child->exp_iconify.not_raise = not_raise;
+             e_client_uniconify(child);
+          }
      }
+   ec->exp_iconify.not_raise = 0;
+   ec->exp_iconify.by_client = 0;
    e_remember_update(ec);
 }
 
index 3c5d7e8..cf89ae5 100644 (file)
@@ -807,7 +807,7 @@ struct E_Client
 
    struct
    {
-      unsigned char by_visibility : 1;
+      unsigned char by_client : 1;
       unsigned char not_raise : 1;
       unsigned char use_resize : 1;
    } exp_iconify;
index 8231194..0b619b5 100644 (file)
@@ -3147,7 +3147,11 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec)
              /* If this is a new window, set the state as requested. */
              if ((ec->new_client) &&
                  (ec->icccm.initial_state == ECORE_X_WINDOW_STATE_HINT_ICONIC))
-               e_client_iconify(ec);
+               {
+                  ELOG("Set ICONIFY BY CLIENT", ec->pixmap, ec);
+                  ec->exp_iconify.by_client = 1;
+                  e_client_iconify(ec);
+               }
           }
         ec->icccm.fetch.hints = 0;
         rem_change = 1;
index 00bad88..d15ece5 100644 (file)
@@ -587,7 +587,11 @@ e_hints_window_init(E_Client *ec)
        (ec->netwm.state.hidden))
      {
         if (!ec->lock_client_iconify)
-          e_client_iconify(ec);
+          {
+             ELOG("Set ICONIFY BY CLIENT", ec->pixmap, ec);
+             ec->exp_iconify.by_client = 1;
+             e_client_iconify(ec);
+          }
         else
           e_hints_window_visible_set(ec);
      }