opt: optimize init commit for no anim
This commit is contained in:
@@ -902,6 +902,7 @@ void resize(Client *c, struct wlr_box geo, int interact) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
c->need_output_flush = true;
|
c->need_output_flush = true;
|
||||||
|
c->dirty = true;
|
||||||
|
|
||||||
// oldgeom = c->geom;
|
// oldgeom = c->geom;
|
||||||
bbox = (interact || c->isfloating || c->isfullscreen) ? &sgeom : &c->mon->w;
|
bbox = (interact || c->isfloating || c->isfullscreen) ? &sgeom : &c->mon->w;
|
||||||
|
|||||||
15
src/mango.c
15
src/mango.c
@@ -2181,8 +2181,9 @@ void commitnotify(struct wl_listener *listener, void *data) {
|
|||||||
setmon(c, NULL, 0,
|
setmon(c, NULL, 0,
|
||||||
true); /* Make sure to reapply rules in mapnotify() */
|
true); /* Make sure to reapply rules in mapnotify() */
|
||||||
|
|
||||||
client_set_tiled(c, WLR_EDGE_TOP | WLR_EDGE_BOTTOM | WLR_EDGE_LEFT |
|
// client_set_tiled(c, WLR_EDGE_TOP | WLR_EDGE_BOTTOM | WLR_EDGE_LEFT |
|
||||||
WLR_EDGE_RIGHT);
|
// WLR_EDGE_RIGHT);
|
||||||
|
|
||||||
uint32_t serial = wlr_xdg_surface_schedule_configure(c->surface.xdg);
|
uint32_t serial = wlr_xdg_surface_schedule_configure(c->surface.xdg);
|
||||||
if (serial > 0) {
|
if (serial > 0) {
|
||||||
c->configure_serial = serial;
|
c->configure_serial = serial;
|
||||||
@@ -2203,17 +2204,15 @@ void commitnotify(struct wl_listener *listener, void *data) {
|
|||||||
c->animation.tagining)
|
c->animation.tagining)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (c == grabc)
|
if (c == grabc || !c->dirty)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
resize(c, c->geom, 0);
|
||||||
|
|
||||||
struct wlr_box *new_geo = &c->surface.xdg->geometry;
|
struct wlr_box *new_geo = &c->surface.xdg->geometry;
|
||||||
bool need_resize = new_geo->width != c->geom.width - 2 * c->bw ||
|
c->dirty = new_geo->width != c->geom.width - 2 * c->bw ||
|
||||||
new_geo->height != c->geom.height - 2 * c->bw ||
|
new_geo->height != c->geom.height - 2 * c->bw ||
|
||||||
new_geo->x != 0 || new_geo->y != 0;
|
new_geo->x != 0 || new_geo->y != 0;
|
||||||
|
|
||||||
if (need_resize) {
|
|
||||||
resize(c, c->geom, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void destroydecoration(struct wl_listener *listener, void *data) {
|
void destroydecoration(struct wl_listener *listener, void *data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user