]> git.mdlowis.com Git - proto/labwc.git/commitdiff
view.c: tweak view_want_deco()
authorJohan Malm <jgm323@gmail.com>
Wed, 5 Aug 2020 19:54:15 +0000 (20:54 +0100)
committerJohan Malm <jgm323@gmail.com>
Wed, 5 Aug 2020 19:54:15 +0000 (20:54 +0100)
src/view.c

index e99df0b0298035c014b3733a5264770df194b9a8..ba067bd3e7b358cf3cfd825ad407bc511c4eddef 100644 (file)
@@ -86,10 +86,17 @@ void view_resize(struct view *view, struct wlr_box geo)
 /* Do we want _server_ side decoration? */
 bool view_want_deco(struct view *view)
 {
-       if (!is_toplevel(view))
-               return false;
        if (view->type == LAB_XDG_SHELL_VIEW && rc.client_side_decorations)
                return false;
+
+       /*
+        * Some XDG shells refuse to give us their CSD in which case their
+        * geometry.{x,y} seems to be greater than zero, so filter on that.
+        */
+       if (view->type == LAB_XDG_SHELL_VIEW && !rc.client_side_decorations &&
+           view->xdg_surface->geometry.x)
+               return false;
+
        if (view->type == LAB_XDG_SHELL_VIEW)
                return true;
        if (view->xwayland_surface->override_redirect)