summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@proton.me>2023-12-07 21:43:48 -0600
committerLeonardo Hernández Hernández <leohdz172@proton.me>2023-12-07 21:43:48 -0600
commit80c9ad12ba81ab54ac6aad8b413a158d1de52705 (patch)
tree54f177e35cefdd182febca8ac8161ced230f16cb
parent7341d047da511a457a54ec342703d6fc6cdd5240 (diff)
reduce calls to client_get_geometry
-rw-r--r--dwl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dwl.c b/dwl.c
index edba265..670e95f 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1512,9 +1512,10 @@ mapnotify(struct wl_listener *listener, void *data)
: wlr_scene_subsurface_tree_create(c->scene, client_surface(c));
c->scene->node.data = c->scene_surface->node.data = c;
+ client_get_geometry(c, &c->geom);
+
/* Handle unmanaged clients first so we can return prior create borders */
if (client_is_unmanaged(c)) {
- client_get_geometry(c, &c->geom);
/* Unmanaged clients always are floating */
wlr_scene_node_reparent(&c->scene->node, layers[LyrFloat]);
wlr_scene_node_set_position(&c->scene->node, c->geom.x + borderpx,
@@ -1533,7 +1534,6 @@ mapnotify(struct wl_listener *listener, void *data)
/* 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);
c->geom.width += 2 * c->bw;
c->geom.height += 2 * c->bw;