+static void win_add_strut(win_t *win)
+{
+ win->type = TYPE_TOOLBAR;
+ for (list_t *cur = screens; cur; cur = cur->next) {
+ win_t *screen = cur->data;
+ strut_t *strut = &win->sys->strut;
+ screen->x += strut->left;
+ screen->y += strut->top;
+ screen->w -= strut->left + strut->right;
+ screen->h -= strut->top + strut->bottom;
+ }
+ struts = list_insert(struts, win);
+
+}
+
+static void win_del_strut(win_t *win)
+{
+ list_t *link = list_find(struts, win);
+ if (!link)
+ return;
+ for (list_t *cur = screens; cur; cur = cur->next) {
+ win_t *screen = cur->data;
+ strut_t *strut = &win->sys->strut;
+ screen->x -= strut->left;
+ screen->y -= strut->top;
+ screen->w += strut->left + strut->right;
+ screen->h += strut->top + strut->bottom;
+ }
+ struts = list_remove(struts, link, 0);
+}
+