In the effort of going away from generic names of protocols only
relevant for weston, rename the weston desktop shell
weston_desktop_shell.

This also resets the version to 1, as there will be no prior versions
to weston_desktop_shell.

Signed-off-by: Jonas Ådahl <jad...@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayl...@gmail.com>
Acked-by: Pekka Paalanen <pekka.paala...@collabora.co.uk>
---
 Makefile.am                       |  20 +++---
 clients/desktop-shell.c           |  79 +++++++++++-----------
 desktop-shell/input-panel.c       |   1 -
 desktop-shell/shell.c             |  76 ++++++++++-----------
 desktop-shell/shell.h             |   4 +-
 protocol/desktop-shell.xml        | 138 --------------------------------------
 protocol/weston-desktop-shell.xml | 134 ++++++++++++++++++++++++++++++++++++
 7 files changed, 224 insertions(+), 228 deletions(-)
 delete mode 100644 protocol/desktop-shell.xml
 create mode 100644 protocol/weston-desktop-shell.xml

diff --git a/Makefile.am b/Makefile.am
index 217c730..1bced97 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -693,9 +693,9 @@ weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) 
$(PANGO_CFLAGS)
 endif
 
 weston_keyboard_SOURCES = clients/keyboard.c
-nodist_weston_keyboard_SOURCES =                       \
-       protocol/desktop-shell-client-protocol.h        \
-       protocol/desktop-shell-protocol.c               \
+nodist_weston_keyboard_SOURCES =                               \
+       protocol/weston-desktop-shell-client-protocol.h         \
+       protocol/weston-desktop-shell-protocol.c                \
        protocol/input-method-unstable-v1-protocol.c            \
        protocol/input-method-unstable-v1-client-protocol.h
 weston_keyboard_LDADD = libtoytoolkit.la
@@ -721,8 +721,8 @@ weston_desktop_shell_SOURCES =                              
\
        clients/desktop-shell.c                         \
        shared/helpers.h
 nodist_weston_desktop_shell_SOURCES =                  \
-       protocol/desktop-shell-client-protocol.h        \
-       protocol/desktop-shell-protocol.c
+       protocol/weston-desktop-shell-client-protocol.h \
+       protocol/weston-desktop-shell-protocol.c
 weston_desktop_shell_LDADD = libtoytoolkit.la
 weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
 
@@ -757,8 +757,8 @@ BUILT_SOURCES +=                                    \
        protocol/text-input-unstable-v1-client-protocol.h               \
        protocol/input-method-unstable-v1-protocol.c                    \
        protocol/input-method-unstable-v1-client-protocol.h             \
-       protocol/desktop-shell-client-protocol.h        \
-       protocol/desktop-shell-protocol.c               \
+       protocol/weston-desktop-shell-client-protocol.h                 \
+       protocol/weston-desktop-shell-protocol.c                        \
        protocol/scaler-client-protocol.h               \
        protocol/scaler-protocol.c                      \
        protocol/workspaces-client-protocol.h           \
@@ -839,8 +839,8 @@ desktop_shell_la_SOURCES =                          \
        desktop-shell/input-panel.c                     \
        shared/helpers.h
 nodist_desktop_shell_la_SOURCES =                      \
-       protocol/desktop-shell-protocol.c               \
-       protocol/desktop-shell-server-protocol.h        \
+       protocol/weston-desktop-shell-protocol.c        \
+       protocol/weston-desktop-shell-server-protocol.h \
        protocol/xdg-shell-unstable-v5-protocol.c       \
        protocol/xdg-shell-unstable-v5-server-protocol.h
 
@@ -1340,7 +1340,7 @@ BUILT_SOURCES +=                          \
        protocol/text-input-unstable-v1-client-protocol.h
 
 EXTRA_DIST +=                                  \
-       protocol/desktop-shell.xml              \
+       protocol/weston-desktop-shell.xml       \
        protocol/screenshooter.xml              \
        protocol/workspaces.xml                 \
        protocol/text-cursor-position.xml       \
diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c
index 9cf3d68..6ab76dc 100644
--- a/clients/desktop-shell.c
+++ b/clients/desktop-shell.c
@@ -47,14 +47,13 @@
 #include "shared/config-parser.h"
 #include "shared/helpers.h"
 
-#include "desktop-shell-client-protocol.h"
+#include "weston-desktop-shell-client-protocol.h"
 
 extern char **environ; /* defined by libc */
 
 struct desktop {
        struct display *display;
-       struct desktop_shell *shell;
-       uint32_t interface_version;
+       struct weston_desktop_shell *shell;
        struct unlock_dialog *unlock_dialog;
        struct task unlock_task;
        struct wl_list outputs;
@@ -72,7 +71,7 @@ struct desktop {
 
 struct surface {
        void (*configure)(void *data,
-                         struct desktop_shell *desktop_shell,
+                         struct weston_desktop_shell *desktop_shell,
                          uint32_t edges, struct window *window,
                          int32_t width, int32_t height);
 };
@@ -174,8 +173,7 @@ check_desktop_ready(struct window *window)
        if (!desktop->painted && is_desktop_painted(desktop)) {
                desktop->painted = 1;
 
-               if (desktop->interface_version >= 2)
-                       desktop_shell_desktop_ready(desktop->shell);
+               weston_desktop_shell_desktop_ready(desktop->shell);
        }
 }
 
@@ -462,7 +460,7 @@ panel_resize_handler(struct widget *widget,
 
 static void
 panel_configure(void *data,
-               struct desktop_shell *desktop_shell,
+               struct weston_desktop_shell *desktop_shell,
                uint32_t edges, struct window *window,
                int32_t width, int32_t height)
 {
@@ -725,7 +723,7 @@ background_draw(struct widget *widget, void *data)
 
 static void
 background_configure(void *data,
-                    struct desktop_shell *desktop_shell,
+                    struct weston_desktop_shell *desktop_shell,
                     uint32_t edges, struct window *window,
                     int32_t width, int32_t height)
 {
@@ -860,6 +858,7 @@ unlock_dialog_create(struct desktop *desktop)
 {
        struct display *display = desktop->display;
        struct unlock_dialog *dialog;
+       struct wl_surface *surface;
 
        dialog = xzalloc(sizeof *dialog);
 
@@ -884,8 +883,8 @@ unlock_dialog_create(struct desktop *desktop)
        widget_set_touch_up_handler(dialog->button,
                                      unlock_dialog_touch_up_handler);
 
-       desktop_shell_set_lock_surface(desktop->shell,
-                                      window_get_wl_surface(dialog->window));
+       surface = window_get_wl_surface(dialog->window);
+       weston_desktop_shell_set_lock_surface(desktop->shell, surface);
 
        window_schedule_resize(dialog->window, 260, 230);
 
@@ -905,14 +904,14 @@ unlock_dialog_finish(struct task *task, uint32_t events)
        struct desktop *desktop =
                container_of(task, struct desktop, unlock_task);
 
-       desktop_shell_unlock(desktop->shell);
+       weston_desktop_shell_unlock(desktop->shell);
        unlock_dialog_destroy(desktop->unlock_dialog);
        desktop->unlock_dialog = NULL;
 }
 
 static void
 desktop_shell_configure(void *data,
-                       struct desktop_shell *desktop_shell,
+                       struct weston_desktop_shell *desktop_shell,
                        uint32_t edges,
                        struct wl_surface *surface,
                        int32_t width, int32_t height)
@@ -925,12 +924,12 @@ desktop_shell_configure(void *data,
 
 static void
 desktop_shell_prepare_lock_surface(void *data,
-                                  struct desktop_shell *desktop_shell)
+                                  struct weston_desktop_shell *desktop_shell)
 {
        struct desktop *desktop = data;
 
        if (!desktop->locking) {
-               desktop_shell_unlock(desktop->shell);
+               weston_desktop_shell_unlock(desktop->shell);
                return;
        }
 
@@ -942,52 +941,52 @@ desktop_shell_prepare_lock_surface(void *data,
 
 static void
 desktop_shell_grab_cursor(void *data,
-                         struct desktop_shell *desktop_shell,
+                         struct weston_desktop_shell *desktop_shell,
                          uint32_t cursor)
 {
        struct desktop *desktop = data;
 
        switch (cursor) {
-       case DESKTOP_SHELL_CURSOR_NONE:
+       case WESTON_DESKTOP_SHELL_CURSOR_NONE:
                desktop->grab_cursor = CURSOR_BLANK;
                break;
-       case DESKTOP_SHELL_CURSOR_BUSY:
+       case WESTON_DESKTOP_SHELL_CURSOR_BUSY:
                desktop->grab_cursor = CURSOR_WATCH;
                break;
-       case DESKTOP_SHELL_CURSOR_MOVE:
+       case WESTON_DESKTOP_SHELL_CURSOR_MOVE:
                desktop->grab_cursor = CURSOR_DRAGGING;
                break;
-       case DESKTOP_SHELL_CURSOR_RESIZE_TOP:
+       case WESTON_DESKTOP_SHELL_CURSOR_RESIZE_TOP:
                desktop->grab_cursor = CURSOR_TOP;
                break;
-       case DESKTOP_SHELL_CURSOR_RESIZE_BOTTOM:
+       case WESTON_DESKTOP_SHELL_CURSOR_RESIZE_BOTTOM:
                desktop->grab_cursor = CURSOR_BOTTOM;
                break;
-       case DESKTOP_SHELL_CURSOR_RESIZE_LEFT:
+       case WESTON_DESKTOP_SHELL_CURSOR_RESIZE_LEFT:
                desktop->grab_cursor = CURSOR_LEFT;
                break;
-       case DESKTOP_SHELL_CURSOR_RESIZE_RIGHT:
+       case WESTON_DESKTOP_SHELL_CURSOR_RESIZE_RIGHT:
                desktop->grab_cursor = CURSOR_RIGHT;
                break;
-       case DESKTOP_SHELL_CURSOR_RESIZE_TOP_LEFT:
+       case WESTON_DESKTOP_SHELL_CURSOR_RESIZE_TOP_LEFT:
                desktop->grab_cursor = CURSOR_TOP_LEFT;
                break;
-       case DESKTOP_SHELL_CURSOR_RESIZE_TOP_RIGHT:
+       case WESTON_DESKTOP_SHELL_CURSOR_RESIZE_TOP_RIGHT:
                desktop->grab_cursor = CURSOR_TOP_RIGHT;
                break;
-       case DESKTOP_SHELL_CURSOR_RESIZE_BOTTOM_LEFT:
+       case WESTON_DESKTOP_SHELL_CURSOR_RESIZE_BOTTOM_LEFT:
                desktop->grab_cursor = CURSOR_BOTTOM_LEFT;
                break;
-       case DESKTOP_SHELL_CURSOR_RESIZE_BOTTOM_RIGHT:
+       case WESTON_DESKTOP_SHELL_CURSOR_RESIZE_BOTTOM_RIGHT:
                desktop->grab_cursor = CURSOR_BOTTOM_RIGHT;
                break;
-       case DESKTOP_SHELL_CURSOR_ARROW:
+       case WESTON_DESKTOP_SHELL_CURSOR_ARROW:
        default:
                desktop->grab_cursor = CURSOR_LEFT_PTR;
        }
 }
 
-static const struct desktop_shell_listener listener = {
+static const struct weston_desktop_shell_listener listener = {
        desktop_shell_configure,
        desktop_shell_prepare_lock_surface,
        desktop_shell_grab_cursor
@@ -1075,7 +1074,7 @@ grab_surface_create(struct desktop *desktop)
        window_set_user_data(desktop->grab_window, desktop);
 
        s = window_get_wl_surface(desktop->grab_window);
-       desktop_shell_set_grab_surface(desktop->shell, s);
+       weston_desktop_shell_set_grab_surface(desktop->shell, s);
 
        desktop->grab_widget =
                window_add_widget(desktop->grab_window, desktop);
@@ -1189,14 +1188,14 @@ output_init(struct output *output, struct desktop 
*desktop)
        if (want_panel(desktop)) {
                output->panel = panel_create(desktop);
                surface = window_get_wl_surface(output->panel->window);
-               desktop_shell_set_panel(desktop->shell,
-                                       output->output, surface);
+               weston_desktop_shell_set_panel(desktop->shell,
+                                              output->output, surface);
        }
 
        output->background = background_create(desktop);
        surface = window_get_wl_surface(output->background->window);
-       desktop_shell_set_background(desktop->shell,
-                                    output->output, surface);
+       weston_desktop_shell_set_background(desktop->shell,
+                                           output->output, surface);
 }
 
 static void
@@ -1228,12 +1227,14 @@ global_handler(struct display *display, uint32_t id,
 {
        struct desktop *desktop = data;
 
-       if (!strcmp(interface, "desktop_shell")) {
-               desktop->interface_version = (version < 2) ? version : 2;
+       if (!strcmp(interface, "weston_desktop_shell")) {
                desktop->shell = display_bind(desktop->display,
-                                             id, &desktop_shell_interface,
-                                             desktop->interface_version);
-               desktop_shell_add_listener(desktop->shell, &listener, desktop);
+                                             id,
+                                             &weston_desktop_shell_interface,
+                                             1);
+               weston_desktop_shell_add_listener(desktop->shell,
+                                                 &listener,
+                                                 desktop);
        } else if (!strcmp(interface, "wl_output")) {
                create_output(desktop, id);
        }
@@ -1334,7 +1335,7 @@ int main(int argc, char *argv[])
        desktop_destroy_outputs(&desktop);
        if (desktop.unlock_dialog)
                unlock_dialog_destroy(desktop.unlock_dialog);
-       desktop_shell_destroy(desktop.shell);
+       weston_desktop_shell_destroy(desktop.shell);
        display_destroy(desktop.display);
 
        return 0;
diff --git a/desktop-shell/input-panel.c b/desktop-shell/input-panel.c
index 8d315dc..73eac5c 100644
--- a/desktop-shell/input-panel.c
+++ b/desktop-shell/input-panel.c
@@ -30,7 +30,6 @@
 #include <string.h>
 
 #include "shell.h"
-#include "desktop-shell-server-protocol.h"
 #include "input-method-unstable-v1-server-protocol.h"
 #include "shared/helpers.h"
 
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 58cad93..f93dc94 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -36,7 +36,7 @@
 #include <sys/types.h>
 
 #include "shell.h"
-#include "desktop-shell-server-protocol.h"
+#include "weston-desktop-shell-server-protocol.h"
 #include "workspaces-server-protocol.h"
 #include "shared/config-parser.h"
 #include "shared/helpers.h"
@@ -375,7 +375,7 @@ shell_grab_start(struct shell_grab *grab,
                 const struct weston_pointer_grab_interface *interface,
                 struct shell_surface *shsurf,
                 struct weston_pointer *pointer,
-                enum desktop_shell_cursor cursor)
+                enum weston_desktop_shell_cursor cursor)
 {
        struct desktop_shell *shell = shsurf->shell;
        struct weston_touch *touch = weston_seat_get_touch(pointer->seat);
@@ -393,7 +393,7 @@ shell_grab_start(struct shell_grab *grab,
        shsurf->grabbed = 1;
        weston_pointer_start_grab(pointer, &grab->grab);
        if (shell->child.desktop_shell) {
-               desktop_shell_send_grab_cursor(shell->child.desktop_shell,
+               
weston_desktop_shell_send_grab_cursor(shell->child.desktop_shell,
                                               cursor);
                weston_pointer_set_focus(pointer,
                                         get_default_view(shell->grab_surface),
@@ -423,8 +423,8 @@ get_output_panel_size(struct desktop_shell *shell,
                        continue;
 
                switch (shell->panel_position) {
-               case DESKTOP_SHELL_PANEL_POSITION_TOP:
-               case DESKTOP_SHELL_PANEL_POSITION_BOTTOM:
+               case WESTON_DESKTOP_SHELL_PANEL_POSITION_TOP:
+               case WESTON_DESKTOP_SHELL_PANEL_POSITION_BOTTOM:
                        weston_view_to_global_float(view,
                                                    view->surface->width, 0,
                                                    &x, &y);
@@ -433,8 +433,8 @@ get_output_panel_size(struct desktop_shell *shell,
                        *height = view->surface->height + (int) y - output->y;
                        return;
 
-               case DESKTOP_SHELL_PANEL_POSITION_LEFT:
-               case DESKTOP_SHELL_PANEL_POSITION_RIGHT:
+               case WESTON_DESKTOP_SHELL_PANEL_POSITION_LEFT:
+               case WESTON_DESKTOP_SHELL_PANEL_POSITION_RIGHT:
                        weston_view_to_global_float(view,
                                                    0, view->surface->height,
                                                    &x, &y);
@@ -465,16 +465,16 @@ get_output_work_area(struct desktop_shell *shell,
 
        get_output_panel_size(shell, output, &panel_width, &panel_height);
        switch (shell->panel_position) {
-       case DESKTOP_SHELL_PANEL_POSITION_TOP:
+       case WESTON_DESKTOP_SHELL_PANEL_POSITION_TOP:
        default:
                area->y += panel_height;
-       case DESKTOP_SHELL_PANEL_POSITION_BOTTOM:
+       case WESTON_DESKTOP_SHELL_PANEL_POSITION_BOTTOM:
                area->width = output->width;
                area->height = output->height - panel_height;
                break;
-       case DESKTOP_SHELL_PANEL_POSITION_LEFT:
+       case WESTON_DESKTOP_SHELL_PANEL_POSITION_LEFT:
                area->x += panel_width;
-       case DESKTOP_SHELL_PANEL_POSITION_RIGHT:
+       case WESTON_DESKTOP_SHELL_PANEL_POSITION_RIGHT:
                area->width = output->width - panel_width;
                area->height = output->height;
                break;
@@ -1718,7 +1718,8 @@ constrain_position(struct weston_move_grab *move, int 
*cx, int *cy)
        x = wl_fixed_to_int(pointer->x + move->dx);
        y = wl_fixed_to_int(pointer->y + move->dy);
 
-       if (shsurf->shell->panel_position == DESKTOP_SHELL_PANEL_POSITION_TOP) {
+       if (shsurf->shell->panel_position ==
+           WESTON_DESKTOP_SHELL_PANEL_POSITION_TOP) {
                get_output_work_area(shsurf->shell,
                                     shsurf->surface->output,
                                     &area);
@@ -1818,7 +1819,7 @@ surface_move(struct shell_surface *shsurf, struct 
weston_pointer *pointer,
        move->client_initiated = client_initiated;
 
        shell_grab_start(&move->base, &move_grab_interface, shsurf,
-                        pointer, DESKTOP_SHELL_CURSOR_MOVE);
+                        pointer, WESTON_DESKTOP_SHELL_CURSOR_MOVE);
 
        return 0;
 }
@@ -2134,7 +2135,7 @@ set_busy_cursor(struct shell_surface *shsurf, struct 
weston_pointer *pointer)
                return;
 
        shell_grab_start(grab, &busy_cursor_grab_interface, shsurf, pointer,
-                        DESKTOP_SHELL_CURSOR_BUSY);
+                        WESTON_DESKTOP_SHELL_CURSOR_BUSY);
        /* Mark the shsurf as ungrabbed so that button binding is able
         * to move it. */
        shsurf->grabbed = 0;
@@ -4453,10 +4454,10 @@ desktop_shell_set_background(struct wl_client *client,
        weston_surface_set_label_func(surface, background_get_label);
        surface->output = wl_resource_get_user_data(output_resource);
        view->output = surface->output;
-       desktop_shell_send_configure(resource, 0,
-                                    surface_resource,
-                                    surface->output->width,
-                                    surface->output->height);
+       weston_desktop_shell_send_configure(resource, 0,
+                                           surface_resource,
+                                           surface->output->width,
+                                           surface->output->height);
 }
 
 static int
@@ -4504,10 +4505,10 @@ desktop_shell_set_panel(struct wl_client *client,
        weston_surface_set_label_func(surface, panel_get_label);
        surface->output = wl_resource_get_user_data(output_resource);
        view->output = surface->output;
-       desktop_shell_send_configure(resource, 0,
-                                    surface_resource,
-                                    surface->output->width,
-                                    surface->output->height);
+       weston_desktop_shell_send_configure(resource, 0,
+                                           surface_resource,
+                                           surface->output->width,
+                                           surface->output->height);
 }
 
 static int
@@ -4639,12 +4640,12 @@ desktop_shell_set_panel_position(struct wl_client 
*client,
 {
        struct desktop_shell *shell = wl_resource_get_user_data(resource);
 
-       if (position != DESKTOP_SHELL_PANEL_POSITION_TOP &&
-           position != DESKTOP_SHELL_PANEL_POSITION_BOTTOM &&
-           position != DESKTOP_SHELL_PANEL_POSITION_LEFT &&
-           position != DESKTOP_SHELL_PANEL_POSITION_RIGHT) {
+       if (position != WESTON_DESKTOP_SHELL_PANEL_POSITION_TOP &&
+           position != WESTON_DESKTOP_SHELL_PANEL_POSITION_BOTTOM &&
+           position != WESTON_DESKTOP_SHELL_PANEL_POSITION_LEFT &&
+           position != WESTON_DESKTOP_SHELL_PANEL_POSITION_RIGHT) {
                wl_resource_post_error(resource,
-                                      DESKTOP_SHELL_ERROR_INVALID_ARGUMENT,
+                                      
WESTON_DESKTOP_SHELL_ERROR_INVALID_ARGUMENT,
                                       "bad position argument");
                return;
        }
@@ -4652,7 +4653,7 @@ desktop_shell_set_panel_position(struct wl_client *client,
        shell->panel_position = position;
 }
 
-static const struct desktop_shell_interface desktop_shell_implementation = {
+static const struct weston_desktop_shell_interface 
desktop_shell_implementation = {
        desktop_shell_set_background,
        desktop_shell_set_panel,
        desktop_shell_set_lock_surface,
@@ -5057,7 +5058,7 @@ surface_rotate(struct shell_surface *surface, struct 
weston_pointer *pointer)
        }
 
        shell_grab_start(&rotate->base, &rotate_grab_interface, surface,
-                        pointer, DESKTOP_SHELL_CURSOR_ARROW);
+                        pointer, WESTON_DESKTOP_SHELL_CURSOR_ARROW);
 }
 
 static void
@@ -5295,6 +5296,8 @@ lock(struct desktop_shell *shell)
 static void
 unlock(struct desktop_shell *shell)
 {
+       struct wl_resource *shell_resource;
+
        if (!shell->locked || shell->lock_surface) {
                shell_fade(shell, FADE_IN);
                return;
@@ -5309,7 +5312,8 @@ unlock(struct desktop_shell *shell)
        if (shell->prepare_event_sent)
                return;
 
-       desktop_shell_send_prepare_lock_surface(shell->child.desktop_shell);
+       shell_resource = shell->child.desktop_shell;
+       weston_desktop_shell_send_prepare_lock_surface(shell_resource);
        shell->prepare_event_sent = true;
 }
 
@@ -5963,18 +5967,14 @@ bind_desktop_shell(struct wl_client *client,
        struct desktop_shell *shell = data;
        struct wl_resource *resource;
 
-       resource = wl_resource_create(client, &desktop_shell_interface,
-                                     MIN(version, 3), id);
+       resource = wl_resource_create(client, &weston_desktop_shell_interface,
+                                     1, id);
 
        if (client == shell->child.client) {
                wl_resource_set_implementation(resource,
                                               &desktop_shell_implementation,
                                               shell, unbind_desktop_shell);
                shell->child.desktop_shell = resource;
-
-               if (version < 2)
-                       shell_fade_startup(shell);
-
                return;
        }
 
@@ -6683,7 +6683,7 @@ module_init(struct weston_compositor *ec,
                return -1;
 
        if (wl_global_create(ec->wl_display,
-                            &desktop_shell_interface, 3,
+                            &weston_desktop_shell_interface, 1,
                             shell, bind_desktop_shell) == NULL)
                return -1;
 
@@ -6693,7 +6693,7 @@ module_init(struct weston_compositor *ec,
 
        shell->child.deathstamp = weston_compositor_get_time();
 
-       shell->panel_position = DESKTOP_SHELL_PANEL_POSITION_TOP;
+       shell->panel_position = WESTON_DESKTOP_SHELL_PANEL_POSITION_TOP;
 
        setup_output_destroy_handler(ec, shell);
 
diff --git a/desktop-shell/shell.h b/desktop-shell/shell.h
index 041ecd8..2ef23f4 100644
--- a/desktop-shell/shell.h
+++ b/desktop-shell/shell.h
@@ -28,7 +28,7 @@
 
 #include "compositor.h"
 
-#include "desktop-shell-server-protocol.h"
+#include "weston-desktop-shell-server-protocol.h"
 
 enum animation_type {
        ANIMATION_NONE,
@@ -202,7 +202,7 @@ struct desktop_shell {
        struct wl_listener output_move_listener;
        struct wl_list output_list;
 
-       enum desktop_shell_panel_position panel_position;
+       enum weston_desktop_shell_panel_position panel_position;
 
        char *client;
 
diff --git a/protocol/desktop-shell.xml b/protocol/desktop-shell.xml
deleted file mode 100644
index dd81574..0000000
--- a/protocol/desktop-shell.xml
+++ /dev/null
@@ -1,138 +0,0 @@
-<protocol name="desktop">
-
-  <interface name="desktop_shell" version="3">
-    <description summary="create desktop widgets and helpers">
-      Traditional user interfaces can rely on this interface to define the
-      foundations of typical desktops. Currently it's possible to set up
-      background, panels and locking surfaces.
-    </description>
-
-    <request name="set_background">
-      <arg name="output" type="object" interface="wl_output"/>
-      <arg name="surface" type="object" interface="wl_surface"/>
-    </request>
-
-    <request name="set_panel">
-      <arg name="output" type="object" interface="wl_output"/>
-      <arg name="surface" type="object" interface="wl_surface"/>
-    </request>
-
-    <request name="set_lock_surface">
-      <arg name="surface" type="object" interface="wl_surface"/>
-    </request>
-
-    <request name="unlock"/>
-
-    <request name="set_grab_surface">
-      <description summary="set grab surface">
-       The surface set by this request will receive a fake
-       pointer.enter event during grabs at position 0, 0 and is
-       expected to set an appropriate cursor image as described by
-       the grab_cursor event sent just before the enter event.
-      </description>
-      <arg name="surface" type="object" interface="wl_surface"/>
-    </request>
-
-    <!-- We'll fold most of wl_shell into this interface and then
-         they'll share the configure event.  -->
-    <event name="configure">
-      <arg name="edges" type="uint"/>
-      <arg name="surface" type="object" interface="wl_surface"/>
-      <arg name="width" type="int"/>
-      <arg name="height" type="int"/>
-    </event>
-
-    <event name="prepare_lock_surface">
-      <description summary="tell the client to create, set the lock surface">
-       Tell the client we want it to create and set the lock surface, which is
-       a GUI asking the user to unlock the screen. The lock surface is
-       announced with 'set_lock_surface'. Whether or not the client actually
-       implements locking, it MUST send 'unlock' request to let the normal
-        desktop resume.
-      </description>
-    </event>
-
-    <event name="grab_cursor">
-      <description summary="tell client what cursor to show during a grab">
-       This event will be sent immediately before a fake enter event on the
-       grab surface.
-      </description>
-      <arg name="cursor" type="uint"/>
-    </event>
-
-    <enum name="cursor">
-      <entry name="none" value="0"/>
-
-      <entry name="resize_top" value="1"/>
-      <entry name="resize_bottom" value="2"/>
-
-      <entry name="arrow" value="3"/>
-
-      <entry name="resize_left" value="4"/>
-      <entry name="resize_top_left" value="5"/>
-      <entry name="resize_bottom_left" value="6"/>
-
-      <entry name="move" value="7"/>
-
-      <entry name="resize_right" value="8"/>
-      <entry name="resize_top_right" value="9"/>
-      <entry name="resize_bottom_right" value="10"/>
-
-      <entry name="busy" value="11"/>
-    </enum>
-
-    <!-- Version 2 additions -->
-
-    <request name="desktop_ready" since="2">
-      <description summary="desktop is ready to be shown">
-       Tell the server, that enough desktop elements have been drawn
-       to make the desktop look ready for use. During start-up, the
-       server can wait for this request with a black screen before
-       starting to fade in the desktop, for instance. If the client
-       parts of a desktop take a long time to initialize, we avoid
-       showing temporary garbage.
-      </description>
-    </request>
-
-    <!-- Version 3 additions -->
-
-    <enum name="panel_position">
-      <entry name="top" value="0"/>
-      <entry name="bottom" value="1"/>
-      <entry name="left" value="2"/>
-      <entry name="right" value="3"/>
-    </enum>
-
-    <enum name="error">
-      <entry name="invalid_argument" value="0"
-        summary="an invalid argument was provided in a request"/>
-    </enum>
-
-    <request name="set_panel_position" since="3">
-      <arg name="position" type="uint"/>
-      <description summary="set panel position">
-        Tell the shell which side of the screen the panel is
-        located. This is so that new windows do not overlap the panel
-        and maximized windows maximize properly.
-      </description>
-    </request>
-
-  </interface>
-
-  <interface name="screensaver" version="1">
-    <description summary="interface for implementing screensavers">
-      Only one client can bind this interface at a time.
-    </description>
-
-    <request name="set_surface">
-      <description summary="set the surface type as a screensaver">
-       A screensaver surface is normally hidden, and only visible after an
-        idle timeout.
-      </description>
-
-      <arg name="surface" type="object" interface="wl_surface"/>
-      <arg name="output" type="object" interface="wl_output"/>
-    </request>
-
-  </interface>
-</protocol>
diff --git a/protocol/weston-desktop-shell.xml 
b/protocol/weston-desktop-shell.xml
new file mode 100644
index 0000000..a21047f
--- /dev/null
+++ b/protocol/weston-desktop-shell.xml
@@ -0,0 +1,134 @@
+<protocol name="weston_desktop">
+
+  <interface name="weston_desktop_shell" version="1">
+    <description summary="create desktop widgets and helpers">
+      Traditional user interfaces can rely on this interface to define the
+      foundations of typical desktops. Currently it's possible to set up
+      background, panels and locking surfaces.
+    </description>
+
+    <request name="set_background">
+      <arg name="output" type="object" interface="wl_output"/>
+      <arg name="surface" type="object" interface="wl_surface"/>
+    </request>
+
+    <request name="set_panel">
+      <arg name="output" type="object" interface="wl_output"/>
+      <arg name="surface" type="object" interface="wl_surface"/>
+    </request>
+
+    <request name="set_lock_surface">
+      <arg name="surface" type="object" interface="wl_surface"/>
+    </request>
+
+    <request name="unlock"/>
+
+    <request name="set_grab_surface">
+      <description summary="set grab surface">
+       The surface set by this request will receive a fake
+       pointer.enter event during grabs at position 0, 0 and is
+       expected to set an appropriate cursor image as described by
+       the grab_cursor event sent just before the enter event.
+      </description>
+      <arg name="surface" type="object" interface="wl_surface"/>
+    </request>
+
+    <!-- We'll fold most of wl_shell into this interface and then
+         they'll share the configure event.  -->
+    <event name="configure">
+      <arg name="edges" type="uint"/>
+      <arg name="surface" type="object" interface="wl_surface"/>
+      <arg name="width" type="int"/>
+      <arg name="height" type="int"/>
+    </event>
+
+    <event name="prepare_lock_surface">
+      <description summary="tell the client to create, set the lock surface">
+       Tell the client we want it to create and set the lock surface, which is
+       a GUI asking the user to unlock the screen. The lock surface is
+       announced with 'set_lock_surface'. Whether or not the client actually
+       implements locking, it MUST send 'unlock' request to let the normal
+        desktop resume.
+      </description>
+    </event>
+
+    <event name="grab_cursor">
+      <description summary="tell client what cursor to show during a grab">
+       This event will be sent immediately before a fake enter event on the
+       grab surface.
+      </description>
+      <arg name="cursor" type="uint"/>
+    </event>
+
+    <enum name="cursor">
+      <entry name="none" value="0"/>
+
+      <entry name="resize_top" value="1"/>
+      <entry name="resize_bottom" value="2"/>
+
+      <entry name="arrow" value="3"/>
+
+      <entry name="resize_left" value="4"/>
+      <entry name="resize_top_left" value="5"/>
+      <entry name="resize_bottom_left" value="6"/>
+
+      <entry name="move" value="7"/>
+
+      <entry name="resize_right" value="8"/>
+      <entry name="resize_top_right" value="9"/>
+      <entry name="resize_bottom_right" value="10"/>
+
+      <entry name="busy" value="11"/>
+    </enum>
+
+    <request name="desktop_ready">
+      <description summary="desktop is ready to be shown">
+       Tell the server, that enough desktop elements have been drawn
+       to make the desktop look ready for use. During start-up, the
+       server can wait for this request with a black screen before
+       starting to fade in the desktop, for instance. If the client
+       parts of a desktop take a long time to initialize, we avoid
+       showing temporary garbage.
+      </description>
+    </request>
+
+    <enum name="panel_position">
+      <entry name="top" value="0"/>
+      <entry name="bottom" value="1"/>
+      <entry name="left" value="2"/>
+      <entry name="right" value="3"/>
+    </enum>
+
+    <enum name="error">
+      <entry name="invalid_argument" value="0"
+        summary="an invalid argument was provided in a request"/>
+    </enum>
+
+    <request name="set_panel_position">
+      <arg name="position" type="uint"/>
+      <description summary="set panel position">
+        Tell the shell which side of the screen the panel is
+        located. This is so that new windows do not overlap the panel
+        and maximized windows maximize properly.
+      </description>
+    </request>
+
+  </interface>
+
+  <interface name="weston_screensaver" version="1">
+    <description summary="interface for implementing screensavers">
+      Only one client can bind this interface at a time.
+    </description>
+
+    <request name="set_surface">
+      <description summary="set the surface type as a screensaver">
+       A screensaver surface is normally hidden, and only visible after an
+        idle timeout.
+      </description>
+
+      <arg name="surface" type="object" interface="wl_surface"/>
+      <arg name="output" type="object" interface="wl_output"/>
+    </request>
+
+  </interface>
+</protocol>
-- 
2.4.3

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to