opt:only scale first frame when zoomin
This commit is contained in:
9
maomao.c
9
maomao.c
@@ -249,6 +249,7 @@ struct Client {
|
|||||||
pid_t pid;
|
pid_t pid;
|
||||||
Client *swallowing, *swallowedby;
|
Client *swallowing, *swallowedby;
|
||||||
bool is_clip_to_hide;
|
bool is_clip_to_hide;
|
||||||
|
bool need_scale_first_frame;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -4224,6 +4225,13 @@ 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 &&
|
||||||
|
c->animation.current.height <= c->geom.height && !c->need_scale_first_frame) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
c->need_scale_first_frame = false;
|
||||||
|
|
||||||
if (c->iskilling || c->animation.tagouting ||
|
if (c->iskilling || c->animation.tagouting ||
|
||||||
c->animation.tagouted || c->animation.tagining) {
|
c->animation.tagouted || c->animation.tagining) {
|
||||||
return;
|
return;
|
||||||
@@ -4487,6 +4495,7 @@ void resize(Client *c, struct wlr_box geo, int interact) {
|
|||||||
|
|
||||||
// wl_event_source_timer_update(c->timer_tick, 10);
|
// wl_event_source_timer_update(c->timer_tick, 10);
|
||||||
c->need_output_flush = true;
|
c->need_output_flush = true;
|
||||||
|
c->need_scale_first_frame = true;
|
||||||
|
|
||||||
// oldgeom = c->geom;
|
// oldgeom = c->geom;
|
||||||
bbox = interact ? &sgeom : &c->mon->w;
|
bbox = interact ? &sgeom : &c->mon->w;
|
||||||
|
|||||||
Reference in New Issue
Block a user