diff --git a/src/animation/client.h b/src/animation/client.h index 1188d2a..de0dc81 100644 --- a/src/animation/client.h +++ b/src/animation/client.h @@ -776,6 +776,7 @@ void resize(Client *c, struct wlr_box geo, int interact) { return; c->need_output_flush = true; + c->dirty = true; // oldgeom = c->geom; bbox = (interact || c->isfloating || c->isfullscreen) ? &sgeom : &c->mon->w; diff --git a/src/mango.c b/src/mango.c index 9670967..b11d438 100644 --- a/src/mango.c +++ b/src/mango.c @@ -2133,8 +2133,8 @@ void commitnotify(struct wl_listener *listener, void *data) { setmon(c, NULL, 0, true); /* Make sure to reapply rules in mapnotify() */ - 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); uint32_t serial = wlr_xdg_surface_schedule_configure(c->surface.xdg); if (serial > 0) { @@ -2156,17 +2156,15 @@ void commitnotify(struct wl_listener *listener, void *data) { c->animation.tagining) return; - if (c == grabc) + if (c == grabc || !c->dirty) return; - struct wlr_box *new_geo = &c->surface.xdg->geometry; - bool need_resize = new_geo->width != c->geom.width - 2 * c->bw || - new_geo->height != c->geom.height - 2 * c->bw || - new_geo->x != 0 || new_geo->y != 0; + resize(c, c->geom, 0); - if (need_resize) { - resize(c, c->geom, 0); - } + struct wlr_box *new_geo = &c->surface.xdg->geometry; + c->dirty = new_geo->width != c->geom.width - 2 * c->bw || + new_geo->height != c->geom.height - 2 * c->bw || + new_geo->x != 0 || new_geo->y != 0; } void destroydecoration(struct wl_listener *listener, void *data) {