forked from mirror/dwl
do not create borders for unmanaged clients
This commit is contained in:
parent
0815626d4c
commit
254f799fde
1 changed files with 8 additions and 7 deletions
15
dwl.c
15
dwl.c
|
@ -1323,17 +1323,11 @@ mapnotify(struct wl_listener *listener, void *data)
|
||||||
? wlr_scene_xdg_surface_create(c->scene, c->surface.xdg)
|
? wlr_scene_xdg_surface_create(c->scene, c->surface.xdg)
|
||||||
: wlr_scene_subsurface_tree_create(c->scene, client_surface(c));
|
: wlr_scene_subsurface_tree_create(c->scene, client_surface(c));
|
||||||
c->scene_surface->data = 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)) {
|
if (client_is_unmanaged(c)) {
|
||||||
client_get_geometry(c, &c->geom);
|
client_get_geometry(c, &c->geom);
|
||||||
/* Floating, no border */
|
/* Floating */
|
||||||
wlr_scene_node_reparent(c->scene, layers[LyrFloat]);
|
wlr_scene_node_reparent(c->scene, layers[LyrFloat]);
|
||||||
c->bw = 0;
|
|
||||||
wlr_scene_node_set_position(c->scene, c->geom.x + borderpx,
|
wlr_scene_node_set_position(c->scene, c->geom.x + borderpx,
|
||||||
c->geom.y + borderpx);
|
c->geom.y + borderpx);
|
||||||
|
|
||||||
|
@ -1342,6 +1336,13 @@ mapnotify(struct wl_listener *listener, void *data)
|
||||||
return;
|
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 */
|
/* Initialize client geometry with room for border */
|
||||||
client_set_tiled(c, WLR_EDGE_TOP | WLR_EDGE_BOTTOM | WLR_EDGE_LEFT | WLR_EDGE_RIGHT);
|
client_set_tiled(c, WLR_EDGE_TOP | WLR_EDGE_BOTTOM | WLR_EDGE_LEFT | WLR_EDGE_RIGHT);
|
||||||
client_get_geometry(c, &c->geom);
|
client_get_geometry(c, &c->geom);
|
||||||
|
|
Loading…
Reference in a new issue