[mutter] wayland: Use xdg shell protocol from wayland-protocols



commit be5643cee769f6a10d556652843e10be52d0b87b
Author: Jonas Ådahl <jadahl gmail com>
Date:   Wed Nov 18 11:23:45 2015 +0800

    wayland: Use xdg shell protocol from wayland-protocols
    
    Use the xdg_shell XML file installed by wayland-protocols instead of
    our own copy. This protocol has yet to go through any unstable naming,
    but since we had an outdated (though wire compatible) version, some
    minor changes were needed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758633

 src/Makefile.am                    |    5 +-
 src/wayland/meta-wayland-surface.c |   14 +-
 src/wayland/protocol/xdg-shell.xml |  485 ------------------------------------
 3 files changed, 9 insertions(+), 495 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index ce4665e..5468d47 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -49,14 +49,13 @@ mutter_built_sources += \
        pointer-gestures-unstable-v1-server-protocol.h                  \
        gtk-shell-protocol.c                    \
        gtk-shell-server-protocol.h             \
-       xdg-shell-protocol.c                    \
-       xdg-shell-server-protocol.h             \
+       xdg-shell-unstable-v5-protocol.c                                \
+       xdg-shell-unstable-v5-server-protocol.h                         \
        $(NULL)
 endif
 
 wayland_protocols =                            \
        wayland/protocol/gtk-shell.xml          \
-       wayland/protocol/xdg-shell.xml          \
        $(NULL)
 
 libmutter_la_SOURCES =                         \
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index f8f6ffc..18f8e16 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -31,7 +31,7 @@
 
 #include <wayland-server.h>
 #include "gtk-shell-server-protocol.h"
-#include "xdg-shell-server-protocol.h"
+#include "xdg-shell-unstable-v5-server-protocol.h"
 
 #include "meta-wayland-private.h"
 #include "meta-xwayland-private.h"
@@ -1433,8 +1433,8 @@ handle_popup_parent_destroyed (struct wl_listener *listener, void *data)
   MetaWaylandSurface *surface =
     wl_container_of (listener, surface, popup.parent_destroy_listener);
 
-  wl_resource_post_error (surface->xdg_popup,
-                          XDG_POPUP_ERROR_NOT_THE_TOPMOST_POPUP,
+  wl_resource_post_error (surface->xdg_shell_resource,
+                          XDG_SHELL_ERROR_NOT_THE_TOPMOST_POPUP,
                           "destroyed popup not top most popup");
   surface->popup.parent = NULL;
 
@@ -1452,8 +1452,8 @@ handle_popup_destroyed (struct wl_listener *listener, void *data)
   top_popup = meta_wayland_popup_get_top_popup (popup);
   if (surface != top_popup)
     {
-      wl_resource_post_error (surface->xdg_popup,
-                              XDG_POPUP_ERROR_NOT_THE_TOPMOST_POPUP,
+      wl_resource_post_error (surface->xdg_shell_resource,
+                              XDG_SHELL_ERROR_NOT_THE_TOPMOST_POPUP,
                               "destroyed popup not top most popup");
     }
 
@@ -1504,7 +1504,7 @@ xdg_shell_get_xdg_popup (struct wl_client *client,
       (parent_surf->xdg_popup == NULL && parent_surf->xdg_surface == NULL))
     {
       wl_resource_post_error (resource,
-                              XDG_POPUP_ERROR_INVALID_PARENT,
+                              XDG_SHELL_ERROR_INVALID_POPUP_PARENT,
                               "invalid parent surface");
       return;
     }
@@ -1514,7 +1514,7 @@ xdg_shell_get_xdg_popup (struct wl_client *client,
       (top_popup != NULL && parent_surf != top_popup))
     {
       wl_resource_post_error (resource,
-                              XDG_POPUP_ERROR_NOT_THE_TOPMOST_POPUP,
+                              XDG_SHELL_ERROR_NOT_THE_TOPMOST_POPUP,
                               "parent not top most surface");
       return;
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]