mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 15:56:42 +00:00
waylandsink/wlwindow: reuse code between the two constructors
This commit is contained in:
parent
a98f589aef
commit
94d02288d0
1 changed files with 2 additions and 8 deletions
|
@ -94,16 +94,10 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, gint width, gint height)
|
||||||
{
|
{
|
||||||
GstWlWindow *window;
|
GstWlWindow *window;
|
||||||
|
|
||||||
window = g_object_new (GST_TYPE_WL_WINDOW, NULL);
|
window = gst_wl_window_new_from_surface (display,
|
||||||
window->display = g_object_ref (display);
|
wl_compositor_create_surface (display->compositor), width, height);
|
||||||
window->width = width;
|
|
||||||
window->height = height;
|
|
||||||
|
|
||||||
window->surface = wl_compositor_create_surface (display->compositor);
|
|
||||||
window->own_surface = TRUE;
|
window->own_surface = TRUE;
|
||||||
|
|
||||||
window->viewport = wl_scaler_get_viewport (display->scaler, window->surface);
|
|
||||||
|
|
||||||
window->shell_surface = wl_shell_get_shell_surface (display->shell,
|
window->shell_surface = wl_shell_get_shell_surface (display->shell,
|
||||||
window->surface);
|
window->surface);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue