mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
feat: blur popup test
This commit is contained in:
parent
e0353979bb
commit
a4dfd70701
1 changed files with 23 additions and 0 deletions
23
src/mango.c
23
src/mango.c
|
|
@ -2278,6 +2278,23 @@ void destroydecoration(struct wl_listener *listener, void *data) {
|
||||||
wl_list_remove(&c->set_decoration_mode.link);
|
wl_list_remove(&c->set_decoration_mode.link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void iter_popup_scene_buffers(struct wlr_scene_buffer *buffer, int sx,
|
||||||
|
int sy, void *user_data) {
|
||||||
|
struct wlr_scene_surface *scene_surface =
|
||||||
|
wlr_scene_surface_try_from_buffer(buffer);
|
||||||
|
if (!scene_surface) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
wlr_scene_buffer_set_backdrop_blur(buffer, true);
|
||||||
|
wlr_scene_buffer_set_backdrop_blur_ignore_transparent(buffer, true);
|
||||||
|
if (blur_optimized) {
|
||||||
|
wlr_scene_buffer_set_backdrop_blur_optimized(buffer, true);
|
||||||
|
} else {
|
||||||
|
wlr_scene_buffer_set_backdrop_blur_optimized(buffer, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void commitpopup(struct wl_listener *listener, void *data) {
|
void commitpopup(struct wl_listener *listener, void *data) {
|
||||||
struct wlr_surface *surface = data;
|
struct wlr_surface *surface = data;
|
||||||
struct wlr_xdg_popup *popup = wlr_xdg_popup_try_from_wlr_surface(surface);
|
struct wlr_xdg_popup *popup = wlr_xdg_popup_try_from_wlr_surface(surface);
|
||||||
|
|
@ -2301,6 +2318,12 @@ void commitpopup(struct wl_listener *listener, void *data) {
|
||||||
wlr_xdg_popup_destroy(popup);
|
wlr_xdg_popup_destroy(popup);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (blur) {
|
||||||
|
wlr_scene_node_for_each_buffer(popup->parent->data,
|
||||||
|
iter_popup_scene_buffers, popup);
|
||||||
|
}
|
||||||
|
|
||||||
box = type == LayerShell ? l->mon->m : c->mon->w;
|
box = type == LayerShell ? l->mon->m : c->mon->w;
|
||||||
box.x -= (type == LayerShell ? l->scene->node.x : c->geom.x);
|
box.x -= (type == LayerShell ? l->scene->node.x : c->geom.x);
|
||||||
box.y -= (type == LayerShell ? l->scene->node.y : c->geom.y);
|
box.y -= (type == LayerShell ? l->scene->node.y : c->geom.y);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue