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 <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2017-02-07 10:50:09 -05:00
parent bcdde959e6
commit e9b8dcf442
1 changed files with 3 additions and 5 deletions

View File

@ -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 *