xwl.c: only add surfaces to view-list on first map

X11 apps produce surfaces which are never mapped. Excluding these from
the view-list simplifices the code.
This commit is contained in:
Johan Malm 2020-08-31 08:33:23 +01:00
parent 7afc189c06
commit a042aad9f6
4 changed files with 7 additions and 21 deletions

View file

@ -29,11 +29,6 @@ struct wlr_box deco_box(struct view *view, enum deco_part deco_part)
struct wlr_box box = { .x = 0, .y = 0, .width = 0, .height = 0 };
BUG_ON(!view);
BUG_ON(!view->surface);
if (!view || !view->surface)
return box;
BUG_ON(!view->been_mapped);
BUG_ON(!view->show_server_side_deco);
if ((view->w < 1) || (view->h < 1)) {
warn("view (%p) has no width/height", view);
return box;