This commit is contained in:
Bjorge Meulemeester 2026-06-19 13:15:41 +02:00 committed by GitHub
commit 80c058d5ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View file

@ -1293,6 +1293,10 @@ void resize(Client *c, struct wlr_box geo, int32_t interact) {
if (!c->mon) if (!c->mon)
return; return;
if (config.blur && c->mon->blur) {
wlr_scene_optimized_blur_mark_dirty(c->mon->blur);
}
c->need_output_flush = true; c->need_output_flush = true;
c->dirty = true; c->dirty = true;

View file

@ -5128,6 +5128,7 @@ void rendermon(struct wl_listener *listener, void *data) {
bool frame_allow_tearing = false; bool frame_allow_tearing = false;
struct timespec now; struct timespec now;
bool need_more_frames = false; bool need_more_frames = false;
bool need_blur_dirty = false; // dirty the blur buffer
if (session && !session->active) { if (session && !session->active) {
return; return;
@ -5143,20 +5144,24 @@ void rendermon(struct wl_listener *listener, void *data) {
layer_list = &m->layers[i]; layer_list = &m->layers[i];
wl_list_for_each_safe(l, tmpl, layer_list, link) { wl_list_for_each_safe(l, tmpl, layer_list, link) {
need_more_frames = layer_draw_frame(l) || need_more_frames; 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) { wl_list_for_each_safe(c, tmp, &fadeout_clients, fadeout_link) {
need_more_frames = client_draw_fadeout_frame(c) || need_more_frames; 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) { wl_list_for_each_safe(l, tmpl, &fadeout_layers, fadeout_link) {
need_more_frames = layer_draw_fadeout_frame(l) || need_more_frames; 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) { wl_list_for_each(c, &clients, link) {
need_more_frames = client_draw_frame(c) || need_more_frames; 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 && if (!config.animations && !grabc && c->configure_serial &&
client_is_rendered_on_mon(c, m)) { client_is_rendered_on_mon(c, m)) {
monitor_check_skip_frame_timeout(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); 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) { if (config.allow_tearing && frame_allow_tearing) {
apply_tear_state(m); apply_tear_state(m);