From d8f72b6c32935c6334d5916a6426a890447d5cbf Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Mon, 28 Sep 2015 12:09:32 -0400 Subject: [PATCH] ecore-wl2: Implement ecore_wl2_window_raise for xdg surfaces also Signed-off-by: Chris Michael --- src/lib/ecore_wl2/ecore_wl2_window.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 40ce88c..6f878f9 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -481,8 +481,20 @@ ecore_wl2_window_raise(Ecore_Wl2_Window *window) { EINA_SAFETY_ON_NULL_RETURN(window); - /* FIXME: This should raise xdg surface also...perhaps using xdg activate */ - if (window->wl_shell_surface) + if (window->xdg_surface) + { + struct wl_array states; + uint32_t *s; + + wl_array_init(&states); + s = wl_array_add(&states, sizeof(*s)); + *s = XDG_SURFACE_STATE_ACTIVATED; + _xdg_surface_cb_configure(window, window->xdg_surface, + window->geometry.w, window->geometry.h, + &states, 0); + wl_array_release(&states); + } + else if (window->wl_shell_surface) wl_shell_surface_set_toplevel(window->wl_shell_surface); } -- 2.7.4