mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-06-19 14:33:16 -04:00
fix: window share not catch shield client
This commit is contained in:
parent
3bffcda833
commit
9c6bcdc71f
2 changed files with 9 additions and 2 deletions
|
|
@ -274,6 +274,11 @@ void buffer_set_effect(Client *c, BufferData data) {
|
|||
}
|
||||
|
||||
void apply_shield(Client *c, struct wlr_box clip_box) {
|
||||
|
||||
if (clip_box.width <= 0 || clip_box.height <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (active_capture_count > 0 && c->shield_when_capture) {
|
||||
wlr_scene_node_raise_to_top(&c->shield->node);
|
||||
wlr_scene_node_set_position(&c->shield->node, clip_box.x, clip_box.y);
|
||||
|
|
@ -781,13 +786,12 @@ void client_apply_clip(Client *c, float factor) {
|
|||
offset = clip_to_hide(c, &clip_box);
|
||||
|
||||
apply_border(c);
|
||||
apply_shield(c, clip_box);
|
||||
|
||||
if (clip_box.width <= 0 || clip_box.height <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
apply_shield(c, clip_box);
|
||||
|
||||
if (!c->overview_scene_surface) {
|
||||
wlr_scene_subsurface_tree_set_clip(&c->scene_surface->node,
|
||||
&clip_box);
|
||||
|
|
|
|||
|
|
@ -4892,6 +4892,9 @@ handle_new_foreign_toplevel_capture_request(struct wl_listener *listener,
|
|||
*request = data;
|
||||
Client *c = request->toplevel_handle->data;
|
||||
|
||||
if (c->shield_when_capture)
|
||||
return;
|
||||
|
||||
if (c->image_capture_source == NULL) {
|
||||
c->image_capture_source =
|
||||
wlr_ext_image_capture_source_v1_create_with_scene_node(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue