mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-03-24 09:06:31 -04:00
opt: Ensure timely shield
This commit is contained in:
parent
a7803bd2a5
commit
b400fd5aad
1 changed files with 16 additions and 0 deletions
16
src/mango.c
16
src/mango.c
|
|
@ -4435,6 +4435,14 @@ void handle_session_destroy(struct wl_listener *listener, void *data) {
|
|||
wl_container_of(listener, tracker, session_destroy);
|
||||
active_capture_count--;
|
||||
wl_list_remove(&tracker->session_destroy.link);
|
||||
|
||||
Client *c = NULL;
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
if (c->shield_when_capture && !c->iskilling && VISIBLEON(c, c->mon)) {
|
||||
arrange(c->mon, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
wlr_log(WLR_DEBUG, "Capture session ended, active count: %d",
|
||||
active_capture_count);
|
||||
free(tracker);
|
||||
|
|
@ -4456,6 +4464,14 @@ void handle_iamge_copy_capture_new_session(struct wl_listener *listener,
|
|||
wl_signal_add(&session->events.destroy, &tracker->session_destroy);
|
||||
|
||||
active_capture_count++;
|
||||
|
||||
Client *c = NULL;
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
if (c->shield_when_capture && !c->iskilling && VISIBLEON(c, c->mon)) {
|
||||
arrange(c->mon, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
wlr_log(WLR_DEBUG, "New capture session started, active count: %d",
|
||||
active_capture_count);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue