From e9b8dcf442d65b13e9db4cf0ba8b4f72721205d6 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 7 Feb 2017 10:50:09 -0500 Subject: [PATCH] elementary: Fix return of elm_win_wl_window_get This patch fixes an issue where the wrong wayland window would be returned from elm_win_wl_window_get. When we lookup a window in Enlightenment, this function would end up returning the parent window (if existed) when what we want there is the actual window. This patch puts the function more in line with the X11 equivalent. Fixes T5142 @fix Signed-off-by: Chris Michael --- src/lib/elementary/efl_ui_win.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index a9db0f480b..707f01f999 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -6777,14 +6777,12 @@ elm_win_wl_window_get(const Evas_Object *obj) return _elm_ee_wlwin_get(ee); } - Ecore_Wl2_Window *ret = NULL; - #if HAVE_ELEMENTARY_WL2 - if (sd->wl.win) ret = sd->wl.win; - if (sd->parent) ret = elm_win_wl_window_get(sd->parent); + if (sd->wl.win) return sd->wl.win; + if (sd->parent) return elm_win_wl_window_get(sd->parent); #endif - return ret; + return NULL; } EAPI Ecore_Cocoa_Window *