Added handling for the new shell_surface_raise request in compositor
authorJimmy Huang <jimmy.huang@intel.com>
Wed, 27 Feb 2013 23:59:50 +0000 (15:59 -0800)
committerOssama Othman <ossama.othman@intel.com>
Fri, 19 Apr 2013 22:59:50 +0000 (15:59 -0700)
Added implementation for raise request for the shell surface interface in wayland
client protocol.  It will call activate to raise the shell surface to the top
of the window stack.

Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
src/shell.c

index d9b977e..2183ab4 100644 (file)
@@ -38,6 +38,8 @@
 #include "workspaces-server-protocol.h"
 #include "../shared/config-parser.h"
 
+#define ENABLE_TIZEN
+
 #define DEFAULT_NUM_WORKSPACES 1
 #define DEFAULT_WORKSPACE_CHANGE_ANIMATION_LENGTH 200
 
@@ -1422,6 +1424,22 @@ shell_surface_set_class(struct wl_client *client,
        shsurf->class = strdup(class);
 }
 
+#ifdef ENABLE_TIZEN
+/* Extended to raise shell surface */
+static void
+shell_surface_raise(struct wl_client *client,
+                   struct wl_resource *resource)
+{
+       struct shell_surface *shsurf = resource->data;
+       struct weston_seat *seat;
+       struct weston_compositor *ec = shsurf->surface->compositor;
+
+       wl_list_for_each(seat, &ec->seat_list, link) {
+               activate(shsurf->shell, shsurf->surface, seat);
+       }
+}
+#endif
+
 static struct weston_output *
 get_default_output(struct weston_compositor *compositor)
 {
@@ -1946,7 +1964,12 @@ static const struct wl_shell_surface_interface shell_surface_implementation = {
        shell_surface_set_popup,
        shell_surface_set_maximized,
        shell_surface_set_title,
+#ifdef ENABLE_TIZEN
+       shell_surface_set_class,
+       shell_surface_raise             // extended to raise app window
+#else
        shell_surface_set_class
+#endif`
 };
 
 static void