From bd5ad17e586e7fc1171a24b4c4eeec135cb956b9 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Wed, 21 May 2014 13:14:15 +0300 Subject: [PATCH] waylandsink: drop width/height arguments from gst_wl_window_new_from_surface() --- ext/wayland/gstwaylandsink.c | 3 ++- ext/wayland/wlwindow.c | 10 ++++++---- ext/wayland/wlwindow.h | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c index 4053d94de0..aa884e83d2 100644 --- a/ext/wayland/gstwaylandsink.c +++ b/ext/wayland/gstwaylandsink.c @@ -681,7 +681,8 @@ gst_wayland_sink_set_window_handle (GstVideoOverlay * overlay, guintptr handle) 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); } } diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c index 992c7009e3..27a64a755c 100644 --- a/ext/wayland/wlwindow.c +++ b/ext/wayland/wlwindow.c @@ -95,9 +95,11 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, gint width, gint 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); @@ -117,7 +119,7 @@ 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) { GstWlWindow *window; struct wl_region *region; @@ -126,8 +128,8 @@ gst_wl_window_new_from_surface (GstWlDisplay * display, 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; diff --git a/ext/wayland/wlwindow.h b/ext/wayland/wlwindow.h index 826922bb98..cfeb5c417d 100644 --- a/ext/wayland/wlwindow.h +++ b/ext/wayland/wlwindow.h @@ -57,7 +57,7 @@ GType gst_wl_window_get_type (void); 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);