mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-07 13:29:59 -05:00
opt: optimize init commit for no anim
This commit is contained in:
parent
2b6757f2ad
commit
1e4a26a4ca
2 changed files with 9 additions and 10 deletions
|
|
@ -776,6 +776,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;
|
||||||
|
|
|
||||||
18
src/mango.c
18
src/mango.c
|
|
@ -2133,8 +2133,8 @@ 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) {
|
||||||
|
|
@ -2156,17 +2156,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;
|
||||||
|
|
||||||
struct wlr_box *new_geo = &c->surface.xdg->geometry;
|
resize(c, c->geom, 0);
|
||||||
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;
|
|
||||||
|
|
||||||
if (need_resize) {
|
struct wlr_box *new_geo = &c->surface.xdg->geometry;
|
||||||
resize(c, c->geom, 0);
|
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) {
|
void destroydecoration(struct wl_listener *listener, void *data) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue