discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=537b4054d35ae88488c11d82b88af00a23414e70

commit 537b4054d35ae88488c11d82b88af00a23414e70
Author: Mike Blumenkrantz <zm...@samsung.com>
Date:   Thu Mar 13 11:58:16 2014 -0400

    simplify/optimize e_win show trap
    
    CID 1163853
---
 src/bin/e_win.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_win.c b/src/bin/e_win.c
index 2cb58c9..fde239d 100644
--- a/src/bin/e_win.c
+++ b/src/bin/e_win.c
@@ -88,10 +88,15 @@ _elm_win_trap_show(void *data, Evas_Object *o)
         else
           {
              E_Pixmap *cp;
+             E_Comp *c = NULL;
 
              cp = e_pixmap_new(E_PIXMAP_TYPE_X, xwin);
              EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_TRUE);
-             ctx->client = 
e_client_new(e_comp_find_by_window(ecore_x_window_root_get(xwin)), cp, 0, 1);
+             if (eina_list_count(e_comp_list()) > 1)
+               c = e_comp_find_by_window(ecore_x_window_root_get(xwin));
+             if (!c)
+               c = e_comp_get(NULL);
+             ctx->client = e_client_new(c, cp, 0, 1);
              EINA_SAFETY_ON_NULL_RETURN_VAL(ctx->client, EINA_TRUE);
           }
         ctx->client->placed = ctx->placed;

-- 


Reply via email to