From: Gwanglim Lee Date: Thu, 7 Aug 2014 14:19:24 +0000 (-0400) Subject: win: Don't call ecore_x_screensaver APIs if elm win doesn't have X11 window X-Git-Tag: upstream/1.20.0~7116^2~14^2~2225 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b79405e8d7cec24ab7a3f1496ede961117d0c923;p=platform%2Fupstream%2Fefl.git win: Don't call ecore_x_screensaver APIs if elm win doesn't have X11 window Summary: Elementary application crashes on startup when it is running with wayland engine. This crash problem happens while ecore_x_screensaver API is being called from _win_noblank_eval funcion. Thus we should not call ecore_x_screensaver APIs if elm win doesn't have X11 window. Test Plan: 1. build efl and elementary to support x11 and also wayland 1. run weston without xwayland 2. run elementary_test on the weston Reviewers: raster, seoz, stefan_schmidt, devilhorns Differential Revision: https://phab.enlightenment.org/D1293 --- diff --git a/legacy/elementary/src/lib/elm_win.c b/legacy/elementary/src/lib/elm_win.c index 68f5365..2ffef69 100644 --- a/legacy/elementary/src/lib/elm_win.c +++ b/legacy/elementary/src/lib/elm_win.c @@ -319,6 +319,7 @@ _win_noblank_eval(void) Eina_List *l; Evas_Object *obj; int noblanks = 0; + Eina_Bool change = EINA_FALSE; #ifdef HAVE_ELEMENTARY_X EINA_LIST_FOREACH(_elm_win_list, l, obj) @@ -329,10 +330,14 @@ _win_noblank_eval(void) { if ((sd->noblank) && (!sd->iconified) && (!sd->withdrawn) && evas_object_visible_get(obj)) - noblanks++; + noblanks++; + + change = EINA_TRUE; } } + if (!change) return; + if (ENGINE_COMPARE(ELM_SOFTWARE_X11) || ENGINE_COMPARE(ELM_SOFTWARE_16_X11) || ENGINE_COMPARE(ELM_XRENDER_X11) || ENGINE_COMPARE(ELM_OPENGL_X11) ||