mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-06-20 14:33:14 -04:00
Merge b264f63a18 into adc1239075
This commit is contained in:
commit
80c058d5ae
2 changed files with 13 additions and 0 deletions
|
|
@ -1293,6 +1293,10 @@ void resize(Client *c, struct wlr_box geo, int32_t interact) {
|
|||
if (!c->mon)
|
||||
return;
|
||||
|
||||
if (config.blur && c->mon->blur) {
|
||||
wlr_scene_optimized_blur_mark_dirty(c->mon->blur);
|
||||
}
|
||||
|
||||
c->need_output_flush = true;
|
||||
c->dirty = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -5128,6 +5128,7 @@ void rendermon(struct wl_listener *listener, void *data) {
|
|||
bool frame_allow_tearing = false;
|
||||
struct timespec now;
|
||||
bool need_more_frames = false;
|
||||
bool need_blur_dirty = false; // dirty the blur buffer
|
||||
|
||||
if (session && !session->active) {
|
||||
return;
|
||||
|
|
@ -5143,20 +5144,24 @@ void rendermon(struct wl_listener *listener, void *data) {
|
|||
layer_list = &m->layers[i];
|
||||
wl_list_for_each_safe(l, tmpl, layer_list, link) {
|
||||
need_more_frames = layer_draw_frame(l) || need_more_frames;
|
||||
if (l->animation.running) need_blur_dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
wl_list_for_each_safe(c, tmp, &fadeout_clients, fadeout_link) {
|
||||
need_more_frames = client_draw_fadeout_frame(c) || need_more_frames;
|
||||
if (l->animation.running) need_blur_dirty = true;
|
||||
}
|
||||
|
||||
wl_list_for_each_safe(l, tmpl, &fadeout_layers, fadeout_link) {
|
||||
need_more_frames = layer_draw_fadeout_frame(l) || need_more_frames;
|
||||
if (l->animation.running) need_blur_dirty = true;
|
||||
}
|
||||
|
||||
// 绘制客户端
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
need_more_frames = client_draw_frame(c) || need_more_frames;
|
||||
if (l->animation.running) need_blur_dirty = true;
|
||||
if (!config.animations && !grabc && c->configure_serial &&
|
||||
client_is_rendered_on_mon(c, m)) {
|
||||
monitor_check_skip_frame_timeout(m);
|
||||
|
|
@ -5168,6 +5173,10 @@ void rendermon(struct wl_listener *listener, void *data) {
|
|||
monitor_stop_skip_frame_timer(m);
|
||||
}
|
||||
|
||||
if (config.blur && m->blur && (need_blur_dirty || need_more_frames)) {
|
||||
wlr_scene_optimized_blur_mark_dirty(m->blur);
|
||||
}
|
||||
|
||||
// 只有在需要帧时才构建和提交状态
|
||||
if (config.allow_tearing && frame_allow_tearing) {
|
||||
apply_tear_state(m);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue