opt: avoid useless get geometry

This commit is contained in:
DreamMaoMao 2025-04-23 11:18:09 +08:00
parent 162c958648
commit 98213f9a54

View file

@ -2621,10 +2621,6 @@ void commitnotify(struct wl_listener *listener, void *data) {
struct wlr_box geometry; struct wlr_box geometry;
client_get_geometry(c, &geometry); client_get_geometry(c, &geometry);
if (geometry.width == c->animation.current.width - 2 * c->bw &&
geometry.height == c->animation.current.height - 2 * c->bw) {
return;
}
if (geometry.width == c->geom.width - 2 * c->bw && if (geometry.width == c->geom.width - 2 * c->bw &&
geometry.height == c->geom.height - 2 * c->bw) { geometry.height == c->geom.height - 2 * c->bw) {
@ -2632,6 +2628,11 @@ void commitnotify(struct wl_listener *listener, void *data) {
return; return;
} }
if (geometry.width == c->animation.current.width - 2 * c->bw &&
geometry.height == c->animation.current.height - 2 * c->bw) {
return;
}
resize(c, c->geom, (c->isfloating && !c->isfullscreen)); resize(c, c->geom, (c->isfloating && !c->isfullscreen));
} }