wl_proxy_set_queue ((struct wl_proxy *) whandle->surface,
sink->display->queue);
sink->window = gst_wl_window_new_from_surface (sink->display,
- whandle->surface, whandle->width, whandle->height);
+ whandle->surface);
+ gst_wl_window_set_size (sink->window, whandle->width, whandle->height);
}
}
GstWlWindow *window;
window = gst_wl_window_new_from_surface (display,
- wl_compositor_create_surface (display->compositor), width, height);
+ wl_compositor_create_surface (display->compositor));
window->own_surface = TRUE;
+ gst_wl_window_set_size (window, width, height);
+
window->shell_surface = wl_shell_get_shell_surface (display->shell,
window->surface);
GstWlWindow *
gst_wl_window_new_from_surface (GstWlDisplay * display,
- struct wl_surface * surface, gint width, gint height)
+ struct wl_surface * surface)
{
GstWlWindow *window;
struct wl_region *region;
window = g_object_new (GST_TYPE_WL_WINDOW, NULL);
window->display = g_object_ref (display);
- window->width = width;
- window->height = height;
+ window->width = 0;
+ window->height = 0;
window->surface = surface;
window->own_surface = FALSE;
GstWlWindow *gst_wl_window_new_toplevel (GstWlDisplay * display,
gint width, gint height);
GstWlWindow *gst_wl_window_new_from_surface (GstWlDisplay * display,
- struct wl_surface * surface, gint width, gint height);
+ struct wl_surface * surface);
GstWlDisplay *gst_wl_window_get_display (GstWlWindow * window);
struct wl_surface *gst_wl_window_get_wl_surface (GstWlWindow * window);