[PATCH xserver 02/10] xwayland: swap "name" and "id" in init_wl_registry()

Olivier Fourdan ofourdan at redhat.com
Tue Jun 5 17:38:37 UTC 2018


Both xwl_glamor_init_wl_registry() and the Wayland global registry
handler use the interface id/name in that order, using name/id in the
egl_backend vfunc makes things confusing and error prone.

Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
---
 hw/xwayland/xwayland-glamor-eglstream.c | 4 ++--
 hw/xwayland/xwayland-glamor-gbm.c       | 4 ++--
 hw/xwayland/xwayland-glamor.c           | 2 +-
 hw/xwayland/xwayland.h                  | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/hw/xwayland/xwayland-glamor-eglstream.c b/hw/xwayland/xwayland-glamor-eglstream.c
index 89c531f4a..f3fd97e6e 100644
--- a/hw/xwayland/xwayland-glamor-eglstream.c
+++ b/hw/xwayland/xwayland-glamor-eglstream.c
@@ -641,8 +641,8 @@ const struct wl_eglstream_display_listener eglstream_display_listener = {
 static void
 xwl_glamor_eglstream_init_wl_registry(struct xwl_screen *xwl_screen,
                                       struct wl_registry *wl_registry,
-                                      const char *name,
-                                      uint32_t id, uint32_t version)
+                                      uint32_t id, const char *name,
+                                      uint32_t version)
 {
     struct xwl_eglstream_private *xwl_eglstream =
         xwl_eglstream_get(xwl_screen);
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 29325adac..d6b979561 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -737,8 +737,8 @@ xwl_screen_set_dmabuf_interface(struct xwl_screen *xwl_screen,
 static void
 xwl_glamor_gbm_init_wl_registry(struct xwl_screen *xwl_screen,
                                 struct wl_registry *wl_registry,
-                                const char *name,
-                                uint32_t id, uint32_t version)
+                                uint32_t id, const char *name,
+                                uint32_t version)
 {
     if (strcmp(name, "wl_drm") == 0)
         xwl_screen_set_drm_interface(xwl_screen, id, version);
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index c7ae51336..14706f6e8 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -73,7 +73,7 @@ xwl_glamor_init_wl_registry(struct xwl_screen *xwl_screen,
 {
     if (xwl_screen->egl_backend.init_wl_registry)
         xwl_screen->egl_backend.init_wl_registry(xwl_screen, registry,
-                                                 interface, id, version);
+                                                 id, interface, version);
 }
 
 struct wl_buffer *
diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h
index 0d4afdf8a..a32fcf6a5 100644
--- a/hw/xwayland/xwayland.h
+++ b/hw/xwayland/xwayland.h
@@ -117,7 +117,7 @@ struct xwl_screen {
          */
         void (*init_wl_registry)(struct xwl_screen *xwl_screen,
                                  struct wl_registry *wl_registry,
-                                 const char *name, uint32_t id,
+                                 uint32_t id, const char *name,
                                  uint32_t version);
 
         /* Called before glamor has been initialized. Backends should setup a
-- 
2.17.1



More information about the xorg-devel mailing list