view.c: enable deco on xdg-shell views

This commit is contained in:
Johan Malm 2020-06-01 07:07:09 +01:00
parent c07acc9ee6
commit bcdd553477
2 changed files with 5 additions and 3 deletions

View file

@ -34,7 +34,7 @@
#define XCURSOR_MOVE "grabbing" #define XCURSOR_MOVE "grabbing"
#define XWL_TITLEBAR_HEIGHT (10) #define XWL_TITLEBAR_HEIGHT (10)
#define XWL_WINDOW_BORDER (3) #define XWL_WINDOW_BORDER (3)
#define LAB_DISABLE_CSD (0) #define LAB_DISABLE_CSD (1)
enum cursor_mode { enum cursor_mode {
LAB_CURSOR_PASSTHROUGH, LAB_CURSOR_PASSTHROUGH,

View file

@ -59,10 +59,12 @@ static bool is_toplevel(struct view *view)
bool view_want_deco(struct view *view) bool view_want_deco(struct view *view)
{ {
if (view->type != LAB_XWAYLAND_VIEW)
return false;
if (!is_toplevel(view)) if (!is_toplevel(view))
return false; return false;
if (view->type == LAB_XDG_SHELL_VIEW && !LAB_DISABLE_CSD)
return false;
if (view->type == LAB_XDG_SHELL_VIEW)
return true;
if (view->xwayland_surface->override_redirect) if (view->xwayland_surface->override_redirect)
return false; return false;
if (view->xwayland_surface->decorations != if (view->xwayland_surface->decorations !=