From: George Kiagiadakis Date: Tue, 11 Mar 2014 17:46:56 +0000 (+0200) Subject: waylandsink/wlwindow: reuse code between the two constructors X-Git-Tag: 1.3.3~80 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=94d02288d0bbfe2941a101ded79700fb50b66303;p=platform%2Fupstream%2Fgst-plugins-bad.git waylandsink/wlwindow: reuse code between the two constructors --- diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c index 11fe0bc..433ed32 100644 --- a/ext/wayland/wlwindow.c +++ b/ext/wayland/wlwindow.c @@ -94,16 +94,10 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, gint width, gint height) { GstWlWindow *window; - window = g_object_new (GST_TYPE_WL_WINDOW, NULL); - window->display = g_object_ref (display); - window->width = width; - window->height = height; - - window->surface = wl_compositor_create_surface (display->compositor); + window = gst_wl_window_new_from_surface (display, + wl_compositor_create_surface (display->compositor), width, height); 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->surface);