[vlc-commits] xdg-shell: tell the WM of the desired window size

Rémi Denis-Courmont git at videolan.org
Mon Jun 18 20:05:58 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jun 18 21:00:44 2018 +0300| [bcb762e24f996e26b94ef4cc3733b7316a9d606e] | committer: Rémi Denis-Courmont

xdg-shell: tell the WM of the desired window size

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bcb762e24f996e26b94ef4cc3733b7316a9d606e
---

 modules/video_output/wayland/xdg-shell.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/video_output/wayland/xdg-shell.c b/modules/video_output/wayland/xdg-shell.c
index 03cc5475a2..07b26d6a2d 100644
--- a/modules/video_output/wayland/xdg-shell.c
+++ b/modules/video_output/wayland/xdg-shell.c
@@ -185,6 +185,14 @@ static int Control(vout_window_t *wnd, int cmd, va_list ap)
             unsigned width = va_arg(ap, unsigned);
             unsigned height = va_arg(ap, unsigned);
 
+#ifdef XDG_SHELL
+            /* The minimum size must be smaller or equal to the maximum size
+             * at _all_ times. This gets a bit cumbersome. */
+            xdg_toplevel_set_min_size(sys->toplevel, 0, 0);
+            xdg_toplevel_set_max_size(sys->toplevel, width, height);
+            xdg_toplevel_set_min_size(sys->toplevel, width, height);
+#endif
+
             vlc_mutex_lock(&sys->lock);
             sys->set.width = width;
             sys->set.height = height;



More information about the vlc-commits mailing list