From e8450397c02a3329c1e646b33eb4e970f0fb511a Mon Sep 17 00:00:00 2001 From: Niels De Graef Date: Wed, 24 Apr 2019 10:41:24 +0200 Subject: [PATCH] gl/wayland: Don't prefix wl_shell struct field 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 | 5 ++--- gst-libs/gst/gl/wayland/gstgldisplay_wayland.h | 2 +- gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gst-libs/gst/gl/wayland/gstgldisplay_wayland.c b/gst-libs/gst/gl/wayland/gstgldisplay_wayland.c index db747a2b28..52147b4ef7 100644 --- a/gst-libs/gst/gl/wayland/gstgldisplay_wayland.c +++ b/gst-libs/gst/gl/wayland/gstgldisplay_wayland.c @@ -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() diff --git a/gst-libs/gst/gl/wayland/gstgldisplay_wayland.h b/gst-libs/gst/gl/wayland/gstgldisplay_wayland.h index eeca15642b..f264878c21 100644 --- a/gst-libs/gst/gl/wayland/gstgldisplay_wayland.h +++ b/gst-libs/gst/gl/wayland/gstgldisplay_wayland.h @@ -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; /* */ gboolean foreign_display; diff --git a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c index 5ec70b1655..ee7a91f805 100644 --- a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c +++ b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c @@ -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) {