mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-05 13:29:54 -05:00
opt: re caculate maxmizescreen window size in arrange
This commit is contained in:
parent
43dd28d992
commit
c72888d391
1 changed files with 17 additions and 0 deletions
17
src/maomao.c
17
src/maomao.c
|
|
@ -541,6 +541,7 @@ static void setcursor(struct wl_listener *listener, void *data);
|
||||||
static void setfloating(Client *c, int floating);
|
static void setfloating(Client *c, int floating);
|
||||||
static void setfullscreen(Client *c, int fullscreen);
|
static void setfullscreen(Client *c, int fullscreen);
|
||||||
static void setmaxmizescreen(Client *c, int maxmizescreen);
|
static void setmaxmizescreen(Client *c, int maxmizescreen);
|
||||||
|
static void reset_maxmizescreen_size(Client *c);
|
||||||
static void setgaps(int oh, int ov, int ih, int iv);
|
static void setgaps(int oh, int ov, int ih, int iv);
|
||||||
|
|
||||||
static void setmon(Client *c, Monitor *m, unsigned int newtags, bool focus);
|
static void setmon(Client *c, Monitor *m, unsigned int newtags, bool focus);
|
||||||
|
|
@ -1754,6 +1755,13 @@ arrange(Monitor *m, bool want_animation) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (c->mon == m && c->ismaxmizescreen
|
||||||
|
&& !c->animation.tagouted && !c->animation.tagouting && VISIBLEON(c, m)) {
|
||||||
|
reset_maxmizescreen_size(c);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 给全屏窗口设置背景为黑色
|
// 给全屏窗口设置背景为黑色
|
||||||
|
|
@ -4994,6 +5002,15 @@ setfloating(Client *c, int floating) {
|
||||||
printstatus();
|
printstatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void reset_maxmizescreen_size(Client *c) {
|
||||||
|
c->geom.x = c->mon->w.x + gappov;
|
||||||
|
c->geom.y = c->mon->w.y + gappoh;
|
||||||
|
c->geom.width = c->mon->w.width - 2 * gappov;
|
||||||
|
c->geom.height = c->mon->w.height - 2 * gappov;
|
||||||
|
resize(c, c->geom, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void setmaxmizescreen(Client *c, int maxmizescreen) {
|
void setmaxmizescreen(Client *c, int maxmizescreen) {
|
||||||
struct wlr_box maxmizescreen_box;
|
struct wlr_box maxmizescreen_box;
|
||||||
if (!c || !c->mon || !client_surface(c)->mapped || c->iskilling)
|
if (!c || !c->mon || !client_surface(c)->mapped || c->iskilling)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue