Commit b52cf2f7 authored by Niels De Graef's avatar Niels De Graef Committed by Matthew Waters

gl/wayland: extract code to create wl_shell_surface

This is just a cosmetic change that will make it easier to differentiate
between wl_shell and xdg_wm_base later.
parent 808e7127
...@@ -248,7 +248,28 @@ destroy_surfaces (GstGLWindowWaylandEGL * window_egl) ...@@ -248,7 +248,28 @@ destroy_surfaces (GstGLWindowWaylandEGL * window_egl)
if (window_egl->window.native) { if (window_egl->window.native) {
wl_egl_window_destroy (window_egl->window.native); wl_egl_window_destroy (window_egl->window.native);
window_egl->window.native = NULL; window_egl->window.native = NULL;
}
static struct wl_shell_surface *
create_wl_shell_surface (GstGLWindowWaylandEGL * window_egl,
GstGLDisplayWayland *display)
{
struct wl_shell_surface *wl_shell_surface;
wl_shell_surface = wl_shell_get_shell_surface (display->wl_shell,
window_egl->window.surface);
if (window_egl->window.queue) {
wl_proxy_set_queue ((struct wl_proxy *) wl_shell_surface,
window_egl->window.queue);
} }
wl_shell_surface_add_listener (wl_shell_surface, &wl_shell_surface_listener,
window_egl);
wl_shell_surface_set_title (wl_shell_surface, "OpenGL Renderer");
wl_shell_surface_set_toplevel (wl_shell_surface);
return wl_shell_surface;
} }
static void static void
...@@ -290,19 +311,7 @@ create_surfaces (GstGLWindowWaylandEGL * window_egl) ...@@ -290,19 +311,7 @@ create_surfaces (GstGLWindowWaylandEGL * window_egl)
} else { } else {
shell_window: shell_window:
if (!window_egl->window.wl_shell_surface) { if (!window_egl->window.wl_shell_surface) {
window_egl->window.wl_shell_surface = window_egl->window.wl_shell_surface = create_wl_shell_surface (display);
wl_shell_get_shell_surface (display->wl_shell,
window_egl->window.surface);
if (window_egl->window.queue)
wl_proxy_set_queue ((struct wl_proxy *) window_egl->
window.wl_shell_surface, window_egl->window.queue);
wl_shell_surface_add_listener (window_egl->window.wl_shell_surface,
&wl_shell_surface_listener, window_egl);
wl_shell_surface_set_title (window_egl->window.wl_shell_surface,
"OpenGL Renderer");
wl_shell_surface_set_toplevel (window_egl->window.wl_shell_surface);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment