diff options
author | Leonardo Hernández Hernández <leohdz172@protonmail.com> | 2022-03-18 01:02:50 -0600 |
---|---|---|
committer | Leonardo Hernández Hernández <leohdz172@protonmail.com> | 2022-03-18 01:02:50 -0600 |
commit | 254f799fde51faf71ce3ec5e7af75826f4263d81 (patch) | |
tree | 2b999b6546a6a577c6a9db634c9d1caa513cbc12 /dwl.c | |
parent | 0815626d4c4db3aa05ed256975476d6a31be2125 (diff) |
do not create borders for unmanaged clients
Diffstat (limited to 'dwl.c')
-rw-r--r-- | dwl.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -1323,17 +1323,11 @@ mapnotify(struct wl_listener *listener, void *data) ? wlr_scene_xdg_surface_create(c->scene, c->surface.xdg) : wlr_scene_subsurface_tree_create(c->scene, client_surface(c)); c->scene_surface->data = c; - for (i = 0; i < 4; i++) { - c->border[i] = wlr_scene_rect_create(c->scene, 0, 0, bordercolor); - c->border[i]->node.data = c; - wlr_scene_rect_set_color(c->border[i], bordercolor); - } if (client_is_unmanaged(c)) { client_get_geometry(c, &c->geom); - /* Floating, no border */ + /* Floating */ wlr_scene_node_reparent(c->scene, layers[LyrFloat]); - c->bw = 0; wlr_scene_node_set_position(c->scene, c->geom.x + borderpx, c->geom.y + borderpx); @@ -1342,6 +1336,13 @@ mapnotify(struct wl_listener *listener, void *data) return; } + for (i = 0; i < 4; i++) { + c->border[i] = wlr_scene_rect_create(c->scene, 0, 0, bordercolor); + c->border[i]->node.data = c; + wlr_scene_rect_set_color(c->border[i], bordercolor); + wlr_scene_node_lower_to_bottom(&c->border[i]->node); + } + /* Initialize client geometry with room for border */ client_set_tiled(c, WLR_EDGE_TOP | WLR_EDGE_BOTTOM | WLR_EDGE_LEFT | WLR_EDGE_RIGHT); client_get_geometry(c, &c->geom); |