diff options
author | Shinya Saito <ssaito@igel.co.jp> | 2019-08-22 16:04:37 +0900 |
---|---|---|
committer | Nicolas Dufresne <nicolas@ndufresne.ca> | 2020-01-10 18:22:57 +0000 |
commit | 58b1f41f992e457b25eda125b6f823f97128e203 (patch) | |
tree | a19f119e8fc7e9964913597de3bfa6bf580b9fb1 /ext/wayland | |
parent | bebf20c9066eb39cfe94f0cd70fc2642a778e524 (diff) |
waylandsink: Fix xdg_shell fullscreen mode
xdg_shell fullscreen mode doesn't work for committing
xdg_surface without configure acknowledgement.
In addition, we can't set different surface setting from
acknowledged config in this mode.
Diffstat (limited to 'ext/wayland')
-rw-r--r-- | ext/wayland/wlwindow.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c index f22ebcab6..50158795b 100644 --- a/ext/wayland/wlwindow.c +++ b/ext/wayland/wlwindow.c @@ -259,7 +259,6 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, const GstVideoInfo * info, gboolean fullscreen, GMutex * render_lock) { GstWlWindow *window; - gint width; window = gst_wl_window_new_internal (display, render_lock); @@ -325,10 +324,14 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, const GstVideoInfo * info, goto error; } - /* set the initial size to be the same as the reported video size */ - width = - gst_util_uint64_scale_int_round (info->width, info->par_n, info->par_d); - gst_wl_window_set_render_rectangle (window, 0, 0, width, info->height); + /* render_rectangle is already set via toplevel_configure in + * xdg_shell fullscreen mode */ + if (!(display->xdg_wm_base && fullscreen)) { + /* set the initial size to be the same as the reported video size */ + gint width = + gst_util_uint64_scale_int_round (info->width, info->par_n, info->par_d); + gst_wl_window_set_render_rectangle (window, 0, 0, width, info->height); + } return window; @@ -548,6 +551,9 @@ gst_wl_window_set_render_rectangle (GstWlWindow * window, gint x, gint y, gst_wl_window_update_borders (window); + if (!window->configured) + return; + if (window->video_width != 0) { wl_subsurface_set_sync (window->video_subsurface); gst_wl_window_resize_video_surface (window, TRUE); |