gl/wayland: Don't prefix wl_shell struct field
authorNiels De Graef <niels.degraef@barco.com>
Wed, 24 Apr 2019 08:41:24 +0000 (10:41 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Wed, 7 Aug 2019 10:05:39 +0000 (11:05 +0100)
As part of commit 808e7127, we prefixed the `GstWlWindow`'s `shell`
field with wl_, to differentiate it from the other types of shells a
Wayland compositor might support. However, this is apparently a struct
that we expose to our users, so changing it means we have an API break.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/592

gst-libs/gst/gl/wayland/gstgldisplay_wayland.c
gst-libs/gst/gl/wayland/gstgldisplay_wayland.h
gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c

index db747a2..52147b4 100644 (file)
@@ -76,8 +76,7 @@ registry_handle_global (void *data, struct wl_registry *registry,
     xdg_wm_base_add_listener (priv->xdg_wm_base, &xdg_wm_base_listener,
         display);
   } else if (g_strcmp0 (interface, "wl_shell") == 0) {
-    display->wl_shell =
-        wl_registry_bind (registry, name, &wl_shell_interface, 1);
+    display->shell = wl_registry_bind (registry, name, &wl_shell_interface, 1);
   }
 }
 
@@ -119,7 +118,7 @@ gst_gl_display_wayland_finalize (GObject * object)
   GstGLDisplayWaylandPrivate *priv =
       gst_gl_display_wayland_get_instance_private (display_wayland);
 
-  g_clear_pointer (&display_wayland->wl_shell, wl_shell_destroy);
+  g_clear_pointer (&display_wayland->shell, wl_shell_destroy);
   g_clear_pointer (&priv->xdg_wm_base, xdg_wm_base_destroy);
 
   /* Cause eglTerminate() to occur before wl_display_disconnect()
index eeca156..f264878 100644 (file)
@@ -58,7 +58,7 @@ struct _GstGLDisplayWayland
   struct wl_subcompositor *subcompositor;
 
   /* Basic shell, see private struct for others (e.g. XDG-shell) */
-  struct wl_shell     *wl_shell;
+  struct wl_shell     *shell;
 
   /* <private> */
   gboolean foreign_display;
index 5ec70b1..ee7a91f 100644 (file)
@@ -342,7 +342,7 @@ create_wl_shell_surface (GstGLWindowWaylandEGL * window_egl)
 
   GST_DEBUG ("Creating surfaces for wl-shell");
 
-  wl_shell_surface = wl_shell_get_shell_surface (display->wl_shell,
+  wl_shell_surface = wl_shell_get_shell_surface (display->shell,
       window_egl->window.surface);
 
   if (window_egl->window.queue) {