From a45fda886b0cee0d8c53060325e99ee63f00f25b Mon Sep 17 00:00:00 2001 From: Gwanglim Lee Date: Sun, 8 Nov 2015 17:01:07 +0900 Subject: [PATCH] fix failed to get window notification level before a shell surface was created. Change-Id: I6cf169b84d514a62b1666eeee3d49481b13baa12 --- src/efl_util.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/efl_util.c b/src/efl_util.c index 901178b..e5f8f33 100644 --- a/src/efl_util.c +++ b/src/efl_util.c @@ -759,16 +759,15 @@ efl_util_get_notification_window_level(Evas_Object *window, { if (lv_info->wait_for_done) { - if (ecore_wl_window_shell_surface_get(wlwin) || - ecore_wl_window_xdg_surface_get(wlwin)) + int count = 0; + while ((lv_info->wait_for_done) && (count < 3)) { - while (lv_info->wait_for_done) - { - ecore_wl_flush(); - wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); - } + ecore_wl_flush(); + wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue); + count++; } - else + + if (lv_info->wait_for_done) { *level = EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT; return EFL_UTIL_ERROR_INVALID_PARAMETER; -- 2.7.4