Revert "Revert "do uniconify when surface request unmap"" 32/71632/1
authorGwanglim Lee <gl77.lee@samsung.com>
Thu, 26 May 2016 08:38:55 +0000 (17:38 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Thu, 26 May 2016 08:40:17 +0000 (17:40 +0900)
This reverts commit b57751a9eb0ac651cca6e1630f73a35475ffe2ab.

Change-Id: I41e398dc40251b1352ebe81899de82a7c002f7a5
Signed-off-by: Gwanglim Lee <gl77.lee@samsung.com>
src/bin/e_client.c
src/bin/e_pixmap.c
src/bin/e_pixmap.h

index 7c4bfbfe7a967c11676916bfad1476c1851b6d9e..57c88a9db52caa11aaed52f2fa789c8dbe0c9687 100644 (file)
@@ -4860,10 +4860,15 @@ e_client_uniconify(E_Client *ec)
    not_raise = ec->exp_iconify.not_raise;
    if (!not_raise)
      evas_object_raise(ec->frame);
-   evas_object_show(ec->frame);
+
+   if (ec->pixmap && e_pixmap_usable_get(ec->pixmap))
+      evas_object_show(ec->frame);
+
    e_client_comp_hidden_set(ec, 0);
    ec->deskshow = ec->iconic = 0;
-   evas_object_focus_set(ec->frame, 1);
+
+   if (ec->pixmap && e_pixmap_usable_get(ec->pixmap))
+      evas_object_focus_set(ec->frame, 1);
 
    _e_client_event_simple(ec, E_EVENT_CLIENT_UNICONIFY);
 
index 3ecb598c5242117eb411031fe2c681ee6536afef..d2c1090ed6e33f19f0fc4bbb9ce67f7b0953242e 100644 (file)
@@ -53,6 +53,8 @@ static Eina_Inlist *_e_pixmap_hooks[] =
 {
    [E_PIXMAP_HOOK_NEW] = NULL,
    [E_PIXMAP_HOOK_DEL] = NULL,
+   [E_PIXMAP_HOOK_USABLE] = NULL,
+   [E_PIXMAP_HOOK_UNUSABLE] = NULL,
 };
 
 static void
@@ -174,6 +176,9 @@ e_pixmap_free(E_Pixmap *cp)
    if (!cp) return 0;
    if (--cp->refcount) return cp->refcount;
    ELOG("PIXMAP DEL", cp, cp->client);
+   if (cp->usable)
+     e_pixmap_usable_set(cp, 0);
+
    _e_pixmap_hook_call(E_PIXMAP_HOOK_DEL, cp);
    e_pixmap_image_clear(cp, EINA_FALSE);
    eina_hash_del_by_key(pixmaps[cp->type], &cp->win);
@@ -301,8 +306,18 @@ e_pixmap_parent_window_set(E_Pixmap *cp, Ecore_Window win)
 E_API void
 e_pixmap_usable_set(E_Pixmap *cp, Eina_Bool set)
 {
+   Eina_Bool tmp = !!set;
    EINA_SAFETY_ON_NULL_RETURN(cp);
-   cp->usable = !!set;
+
+   if (cp->usable != tmp)
+     {
+        cp->usable = tmp;
+
+        if (cp->usable)
+          _e_pixmap_hook_call(E_PIXMAP_HOOK_USABLE, cp);
+        else
+          _e_pixmap_hook_call(E_PIXMAP_HOOK_UNUSABLE, cp);
+     }
 }
 
 E_API Eina_Bool
index 7a7e10613e94ef17ea2ec27d2e785b8ad28b10fa..0a26e63b61803b9df8567ff86fff93eeee622667 100644 (file)
@@ -20,6 +20,8 @@ typedef enum _E_Pixmap_Hook_Point
 {
    E_PIXMAP_HOOK_NEW,
    E_PIXMAP_HOOK_DEL,
+   E_PIXMAP_HOOK_USABLE,
+   E_PIXMAP_HOOK_UNUSABLE,
    E_PIXMAP_HOOK_LAST
 } E_Pixmap_Hook_Point;