From: Sungbae Park Date: Tue, 24 May 2016 12:33:01 +0000 (+0900) Subject: do uniconify when surface request unmap X-Git-Tag: accepted/tizen/common/20160527.152912~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d769f700cc04ff16821eac89c71b35694eaee1b5;p=platform%2Fupstream%2Fenlightenment.git do uniconify when surface request unmap Signed-off-by: Sungbae Park Change-Id: Ic42f32e018503303e1bbd4ab083625c5d3d7f1d1 --- diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 82cc492..47f040f 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -4837,10 +4837,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); diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c index 3ecb598..d2c1090 100644 --- a/src/bin/e_pixmap.c +++ b/src/bin/e_pixmap.c @@ -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 diff --git a/src/bin/e_pixmap.h b/src/bin/e_pixmap.h index 7a7e106..0a26e63 100644 --- a/src/bin/e_pixmap.h +++ b/src/bin/e_pixmap.h @@ -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;