waylandsink: drop width/height arguments from gst_wl_window_new_from_surface()
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Wed, 21 May 2014 10:14:15 +0000 (13:14 +0300)
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Tue, 17 Jun 2014 11:51:27 +0000 (13:51 +0200)
ext/wayland/gstwaylandsink.c
ext/wayland/wlwindow.c
ext/wayland/wlwindow.h

index 4053d94..aa884e8 100644 (file)
@@ -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);
     }
   }
 
index 992c700..27a64a7 100644 (file)
@@ -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;
index 826922b..cfeb5c4 100644 (file)
@@ -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);