mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-31 22:25:29 -04:00
opt: scale buffer when resize not ready
This commit is contained in:
parent
5537bccfee
commit
56ff5f6dd3
1 changed files with 9 additions and 2 deletions
9
maomao.c
9
maomao.c
|
|
@ -2224,6 +2224,12 @@ void commitnotify(struct wl_listener *listener, void *data) {
|
||||||
if (c == grabc)
|
if (c == grabc)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
uint32_t width, height;
|
||||||
|
client_actual_size(c, &width, &height);
|
||||||
|
|
||||||
|
if(c->geom.width == width && c->geom.height == height)
|
||||||
|
return;
|
||||||
|
|
||||||
// if don't do this, some client may resize uncompleted
|
// if don't do this, some client may resize uncompleted
|
||||||
resize(c, c->geom, (c->isfloating && !c->isfullscreen));
|
resize(c, c->geom, (c->isfloating && !c->isfullscreen));
|
||||||
|
|
||||||
|
|
@ -4172,7 +4178,8 @@ void snap_scene_buffer_apply_size(struct wlr_scene_buffer *buffer, int sx,
|
||||||
|
|
||||||
void buffer_set_size(Client *c, animationScale data) {
|
void buffer_set_size(Client *c, animationScale data) {
|
||||||
if (c->animation.current.width <= c->geom.width &&
|
if (c->animation.current.width <= c->geom.width &&
|
||||||
c->animation.current.height <= c->geom.height) {
|
c->animation.current.height <= c->geom.height &&
|
||||||
|
data.height_scale == 1 && data.width_scale == 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (c->iskilling || c->animation.tagouting || c->animation.tagining ||
|
if (c->iskilling || c->animation.tagouting || c->animation.tagining ||
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue