Added api to raise window in wayland 03/2803/1
authorJimmy Huang <jimmy.huang@intel.com>
Tue, 5 Mar 2013 00:51:53 +0000 (16:51 -0800)
committerJimmy Huang <jimmy.huang@intel.com>
Tue, 5 Mar 2013 00:51:53 +0000 (16:51 -0800)
Added ecore_wl_window_shell_surface_raise(), this will allow AUL/app-core to to resume an app by raising the wayland surface in Weston.  This requires patched Wayland protocol and Weston to support shell_surface_raise.

Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
src/lib/ecore_wayland/Ecore_Wayland.h
src/lib/ecore_wayland/ecore_wl_window.c

index 8f22be3..c080715 100644 (file)
@@ -372,6 +372,7 @@ EAPI void ecore_wl_window_buffer_attach(Ecore_Wl_Window *win, struct wl_buffer *
 EAPI void ecore_wl_window_show(Ecore_Wl_Window *win);
 EAPI void ecore_wl_window_hide(Ecore_Wl_Window *win);
 EAPI void ecore_wl_window_raise(Ecore_Wl_Window *win);
+EAPI void ecore_wl_window_shell_surface_raise(Ecore_Wl_Window *win);
 EAPI void ecore_wl_window_maximized_set(Ecore_Wl_Window *win, Eina_Bool maximized);
 EAPI void ecore_wl_window_fullscreen_set(Ecore_Wl_Window *win, Eina_Bool fullscreen);
 EAPI void ecore_wl_window_transparent_set(Ecore_Wl_Window *win, Eina_Bool transparent);
index 2a908a6..d29179e 100644 (file)
@@ -455,6 +455,27 @@ ecore_wl_window_raise(Ecore_Wl_Window *win)
      wl_shell_surface_set_toplevel(win->shell_surface);
 }
 
+/*
+ * Raises a window's shell surface
+ * Send a request to wayland to raise the window surface
+ * Maybe this function should be what ecore_wl_window_raise()
+ * intended to do instead of calling set_toplevel on the surface?
+ */
+EAPI void
+ecore_wl_window_shell_surface_raise(Ecore_Wl_Window *win)
+{
+   LOGFN(__FILE__, __LINE__, __FUNCTION__);
+
+   if (!win) return;
+   if (win->shell_surface) {
+     /*
+      * The wayland protocol and weston shell needs to
+      * be patched to support wl_shell_surface_raise
+      */
+     wl_shell_surface_raise(win->shell_surface);
+   }
+}
+
 EAPI void 
 ecore_wl_window_maximized_set(Ecore_Wl_Window *win, Eina_Bool maximized)
 {