waylandsink: make gst_wl_window_is_toplevel aware of XDG shell
authorAndrey Konovalov <andrey.konovalov@linaro.org>
Tue, 9 Apr 2019 18:32:36 +0000 (21:32 +0300)
committerAndrey Konovalov <andrey.konovalov@linaro.org>
Tue, 9 Apr 2019 18:32:36 +0000 (21:32 +0300)
ext/wayland/wlwindow.c

index 0a1c156013ec6f3a6613a5346784c64cd731bb7e..77b2d81d45825f9e3b63ebd50b8b0b636cedc1ec 100644 (file)
@@ -360,7 +360,10 @@ gst_wl_window_is_toplevel (GstWlWindow * window)
 {
   g_return_val_if_fail (window != NULL, FALSE);
 
-  return (window->wl_shell_surface != NULL);
+  if (window->display->xdg_wm_base)
+    return (window->xdg_toplevel != NULL);
+  else
+    return (window->wl_shell_surface != NULL);
 }
 
 static void