Compare commits
29 Commits
16368a8781
...
ffa496fa98
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ffa496fa98 | ||
|
|
8ab59c1aca | ||
|
|
b3578344dc | ||
|
|
389f417a3b | ||
|
|
d2e0df024d | ||
|
|
bd6a71f05e | ||
|
|
cfb66111de | ||
|
|
94e47bc3b0 | ||
|
|
43424152f3 | ||
|
|
0ff4d94365 | ||
|
|
ade00f88f0 | ||
|
|
7ed12cf921 | ||
|
|
64d8764f58 | ||
|
|
d0a51f4785 | ||
|
|
7552e77781 | ||
|
|
c206693257 | ||
|
|
11dfab478a | ||
|
|
3cfcaa21c0 | ||
|
|
276560840b | ||
|
|
ee789613ff | ||
|
|
8ac331aa64 | ||
|
|
e59b9c10b5 | ||
|
|
9fecdb6c3a | ||
|
|
c51cf7d6cc | ||
|
|
a42939f0c2 | ||
|
|
fbdf7fdb34 | ||
|
|
16dc4fa9cd | ||
|
|
9b97d11c83 | ||
|
|
58790c0e53 |
46
flake.lock
generated
46
flake.lock
generated
@@ -18,6 +18,27 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": [
|
||||||
|
"scenefx",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1750386251,
|
"lastModified": 1750386251,
|
||||||
@@ -58,16 +79,18 @@
|
|||||||
},
|
},
|
||||||
"scenefx": {
|
"scenefx": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
],
|
||||||
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1750785057,
|
"lastModified": 1762447505,
|
||||||
"narHash": "sha256-tGX6j4W91rcb+glXJo43sjPI9zQvPotonknG1BdihR4=",
|
"narHash": "sha256-VEBQ8KXkSS4c+kdAhmvq06lEd9WNeCXdRK1U+qSilFw=",
|
||||||
"owner": "wlrfx",
|
"owner": "wlrfx",
|
||||||
"repo": "scenefx",
|
"repo": "scenefx",
|
||||||
"rev": "3a6cfb12e4ba97b43326357d14f7b3e40897adfc",
|
"rev": "7f9e7409f6169fa637f1265895c121a8f8b70272",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -75,6 +98,21 @@
|
|||||||
"repo": "scenefx",
|
"repo": "scenefx",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689347949,
|
||||||
|
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
@@ -25,12 +25,13 @@
|
|||||||
|
|
||||||
perSystem = {
|
perSystem = {
|
||||||
config,
|
config,
|
||||||
|
system,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (pkgs) callPackage ;
|
inherit (pkgs) callPackage;
|
||||||
mango = callPackage ./nix {
|
mango = callPackage ./nix {
|
||||||
inherit (inputs.scenefx.packages.${pkgs.stdenv.hostPlatform.system}) scenefx;
|
scenefx = inputs.scenefx.packages.${system}.default;
|
||||||
};
|
};
|
||||||
shellOverride = old: {
|
shellOverride = old: {
|
||||||
nativeBuildInputs = old.nativeBuildInputs ++ [];
|
nativeBuildInputs = old.nativeBuildInputs ++ [];
|
||||||
|
|||||||
@@ -245,6 +245,10 @@ void buffer_set_effect(Client *c, BufferData data) {
|
|||||||
data.corner_location = CORNER_LOCATION_NONE;
|
data.corner_location = CORNER_LOCATION_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (blur && !c->noblur) {
|
||||||
|
wlr_scene_blur_set_corner_radius(c->blur, border_radius,
|
||||||
|
data.corner_location);
|
||||||
|
}
|
||||||
wlr_scene_node_for_each_buffer(&c->scene_surface->node,
|
wlr_scene_node_for_each_buffer(&c->scene_surface->node,
|
||||||
scene_buffer_apply_effect, &data);
|
scene_buffer_apply_effect, &data);
|
||||||
}
|
}
|
||||||
@@ -349,6 +353,19 @@ void client_draw_shadow(Client *c) {
|
|||||||
wlr_scene_shadow_set_clipped_region(c->shadow, clipped_region);
|
wlr_scene_shadow_set_clipped_region(c->shadow, clipped_region);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void client_draw_blur(Client *c, struct wlr_box clip_box, struct ivec2 offset) {
|
||||||
|
if (blur && !c->noblur) {
|
||||||
|
if (c->scene_surface->node.enabled && !c->blur->node.enabled)
|
||||||
|
wlr_scene_node_set_enabled(&c->blur->node, true);
|
||||||
|
wlr_scene_node_set_position(&c->blur->node, offset.x, offset.y);
|
||||||
|
wlr_scene_blur_set_size(c->blur, clip_box.width - c->bw,
|
||||||
|
clip_box.height - c->bw);
|
||||||
|
} else {
|
||||||
|
if (c->blur->node.enabled)
|
||||||
|
wlr_scene_node_set_enabled(&c->blur->node, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void apply_border(Client *c) {
|
void apply_border(Client *c) {
|
||||||
if (!c || c->iskilling || !client_surface(c)->mapped)
|
if (!c || c->iskilling || !client_surface(c)->mapped)
|
||||||
return;
|
return;
|
||||||
@@ -533,12 +550,14 @@ void client_apply_clip(Client *c, float factor) {
|
|||||||
|
|
||||||
apply_border(c);
|
apply_border(c);
|
||||||
client_draw_shadow(c);
|
client_draw_shadow(c);
|
||||||
|
client_draw_blur(c, clip_box, offset);
|
||||||
|
|
||||||
if (clip_box.width <= 0 || clip_box.height <= 0) {
|
if (clip_box.width <= 0 || clip_box.height <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
wlr_scene_subsurface_tree_set_clip(&c->scene_surface->node, &clip_box);
|
wlr_scene_subsurface_tree_set_clip(&c->scene_surface->node, &clip_box);
|
||||||
|
|
||||||
buffer_set_effect(c, (BufferData){1.0f, 1.0f, clip_box.width,
|
buffer_set_effect(c, (BufferData){1.0f, 1.0f, clip_box.width,
|
||||||
clip_box.height,
|
clip_box.height,
|
||||||
current_corner_location, true});
|
current_corner_location, true});
|
||||||
@@ -570,6 +589,7 @@ void client_apply_clip(Client *c, float factor) {
|
|||||||
// 应用窗口装饰
|
// 应用窗口装饰
|
||||||
apply_border(c);
|
apply_border(c);
|
||||||
client_draw_shadow(c);
|
client_draw_shadow(c);
|
||||||
|
client_draw_blur(c, clip_box, offset);
|
||||||
|
|
||||||
// 如果窗口剪切区域已经剪切到0,则不渲染窗口表面
|
// 如果窗口剪切区域已经剪切到0,则不渲染窗口表面
|
||||||
if (clip_box.width <= 0 || clip_box.height <= 0) {
|
if (clip_box.width <= 0 || clip_box.height <= 0) {
|
||||||
@@ -991,6 +1011,10 @@ void resize(Client *c, struct wlr_box geo, int interact) {
|
|||||||
apply_border(c);
|
apply_border(c);
|
||||||
client_get_clip(c, &clip);
|
client_get_clip(c, &clip);
|
||||||
wlr_scene_subsurface_tree_set_clip(&c->scene_surface->node, &clip);
|
wlr_scene_subsurface_tree_set_clip(&c->scene_surface->node, &clip);
|
||||||
|
if (blur && !c->noblur)
|
||||||
|
wlr_scene_blur_set_size(c->blur,
|
||||||
|
c->animation.current.width - 2 * c->bw,
|
||||||
|
c->animation.current.height - 2 * c->bw);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 如果不是工作区切换时划出去的窗口,就让动画的结束位置,就是上面的真实位置和大小
|
// 如果不是工作区切换时划出去的窗口,就让动画的结束位置,就是上面的真实位置和大小
|
||||||
|
|||||||
@@ -158,12 +158,6 @@ static bool scene_node_snapshot(struct wlr_scene_node *node, int lx, int ly,
|
|||||||
scene_buffer->corner_radius,
|
scene_buffer->corner_radius,
|
||||||
scene_buffer->corners);
|
scene_buffer->corners);
|
||||||
|
|
||||||
// wlr_scene_buffer_set_backdrop_blur_optimized(
|
|
||||||
// snapshot_buffer, scene_buffer->backdrop_blur_optimized);
|
|
||||||
// wlr_scene_buffer_set_backdrop_blur_ignore_transparent(
|
|
||||||
// snapshot_buffer, scene_buffer->backdrop_blur_ignore_transparent);
|
|
||||||
wlr_scene_buffer_set_backdrop_blur(snapshot_buffer, false);
|
|
||||||
|
|
||||||
snapshot_buffer->node.data = scene_buffer->node.data;
|
snapshot_buffer->node.data = scene_buffer->node.data;
|
||||||
|
|
||||||
struct wlr_scene_surface *scene_surface =
|
struct wlr_scene_surface *scene_surface =
|
||||||
@@ -198,6 +192,8 @@ static bool scene_node_snapshot(struct wlr_scene_node *node, int lx, int ly,
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case WLR_SCENE_NODE_BLUR:
|
||||||
|
break;
|
||||||
case WLR_SCENE_NODE_OPTIMIZED_BLUR:
|
case WLR_SCENE_NODE_OPTIMIZED_BLUR:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -356,6 +356,10 @@ void layer_animation_next_tick(LayerSurface *l) {
|
|||||||
.height = height,
|
.height = height,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (blur && blur_layer && !l->noblur && l->blur)
|
||||||
|
wlr_scene_blur_set_size(l->blur, l->animation.current.width,
|
||||||
|
l->animation.current.height);
|
||||||
|
|
||||||
if (animation_passed >= 1.0) {
|
if (animation_passed >= 1.0) {
|
||||||
l->animation.running = false;
|
l->animation.running = false;
|
||||||
l->need_output_flush = false;
|
l->need_output_flush = false;
|
||||||
|
|||||||
79
src/mango.c
79
src/mango.c
@@ -285,6 +285,7 @@ struct Client {
|
|||||||
struct wlr_scene_tree *scene;
|
struct wlr_scene_tree *scene;
|
||||||
struct wlr_scene_rect *border; /* top, bottom, left, right */
|
struct wlr_scene_rect *border; /* top, bottom, left, right */
|
||||||
struct wlr_scene_shadow *shadow;
|
struct wlr_scene_shadow *shadow;
|
||||||
|
struct wlr_scene_blur *blur;
|
||||||
struct wlr_scene_tree *scene_surface;
|
struct wlr_scene_tree *scene_surface;
|
||||||
struct wl_list link;
|
struct wl_list link;
|
||||||
struct wl_list flink;
|
struct wl_list flink;
|
||||||
@@ -423,6 +424,7 @@ typedef struct {
|
|||||||
struct wlr_scene_tree *scene;
|
struct wlr_scene_tree *scene;
|
||||||
struct wlr_scene_tree *popups;
|
struct wlr_scene_tree *popups;
|
||||||
struct wlr_scene_shadow *shadow;
|
struct wlr_scene_shadow *shadow;
|
||||||
|
struct wlr_scene_blur *blur;
|
||||||
struct wlr_scene_layer_surface_v1 *scene_layer;
|
struct wlr_scene_layer_surface_v1 *scene_layer;
|
||||||
struct wl_list link;
|
struct wl_list link;
|
||||||
struct wl_list fadeout_link;
|
struct wl_list fadeout_link;
|
||||||
@@ -1557,19 +1559,12 @@ void apply_window_snap(Client *c) {
|
|||||||
resize(c, c->geom, 0);
|
resize(c, c->geom, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void focuslayer(LayerSurface *l) {
|
|
||||||
focusclient(NULL, 0);
|
|
||||||
dwl_im_relay_set_focus(dwl_input_method_relay, l->layer_surface->surface);
|
|
||||||
client_notify_enter(l->layer_surface->surface, wlr_seat_get_keyboard(seat));
|
|
||||||
}
|
|
||||||
|
|
||||||
void reset_exclusive_layer(Monitor *m) {
|
void reset_exclusive_layer(Monitor *m) {
|
||||||
LayerSurface *l = NULL;
|
LayerSurface *l = NULL;
|
||||||
int i;
|
int i;
|
||||||
unsigned int layers_above_shell[] = {
|
unsigned int layers_above_shell[] = {
|
||||||
ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY,
|
ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY,
|
||||||
ZWLR_LAYER_SHELL_V1_LAYER_TOP,
|
ZWLR_LAYER_SHELL_V1_LAYER_TOP,
|
||||||
ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!m)
|
if (!m)
|
||||||
@@ -1577,24 +1572,18 @@ void reset_exclusive_layer(Monitor *m) {
|
|||||||
|
|
||||||
for (i = 0; i < (int)LENGTH(layers_above_shell); i++) {
|
for (i = 0; i < (int)LENGTH(layers_above_shell); i++) {
|
||||||
wl_list_for_each_reverse(l, &m->layers[layers_above_shell[i]], link) {
|
wl_list_for_each_reverse(l, &m->layers[layers_above_shell[i]], link) {
|
||||||
if (l == exclusive_focus &&
|
|
||||||
l->layer_surface->current.keyboard_interactive !=
|
|
||||||
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE)
|
|
||||||
exclusive_focus = NULL;
|
|
||||||
if (l->layer_surface->current.keyboard_interactive ==
|
|
||||||
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE &&
|
|
||||||
l->layer_surface->surface ==
|
|
||||||
seat->keyboard_state.focused_surface)
|
|
||||||
focusclient(focustop(selmon), 1);
|
|
||||||
|
|
||||||
if (locked ||
|
if (locked ||
|
||||||
l->layer_surface->current.keyboard_interactive !=
|
l->layer_surface->current.keyboard_interactive !=
|
||||||
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE ||
|
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE ||
|
||||||
!l->mapped || l == exclusive_focus)
|
!l->mapped || l == exclusive_focus)
|
||||||
continue;
|
continue;
|
||||||
/* Deactivate the focused client. */
|
/* Deactivate the focused client. */
|
||||||
|
focusclient(NULL, 0);
|
||||||
exclusive_focus = l;
|
exclusive_focus = l;
|
||||||
focuslayer(l);
|
dwl_im_relay_set_focus(dwl_input_method_relay,
|
||||||
|
l->layer_surface->surface);
|
||||||
|
client_notify_enter(l->layer_surface->surface,
|
||||||
|
wlr_seat_get_keyboard(seat));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1895,7 +1884,11 @@ buttonpress(struct wl_listener *listener, void *data) {
|
|||||||
if (l && !exclusive_focus &&
|
if (l && !exclusive_focus &&
|
||||||
l->layer_surface->current.keyboard_interactive ==
|
l->layer_surface->current.keyboard_interactive ==
|
||||||
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND) {
|
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND) {
|
||||||
focuslayer(l);
|
focusclient(NULL, 0);
|
||||||
|
dwl_im_relay_set_focus(dwl_input_method_relay,
|
||||||
|
l->layer_surface->surface);
|
||||||
|
client_notify_enter(l->layer_surface->surface,
|
||||||
|
wlr_seat_get_keyboard(seat));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2152,12 +2145,16 @@ static void iter_layer_scene_buffers(struct wlr_scene_buffer *buffer, int sx,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
wlr_scene_buffer_set_backdrop_blur(buffer, true);
|
LayerSurface *l = (LayerSurface *)user_data;
|
||||||
wlr_scene_buffer_set_backdrop_blur_ignore_transparent(buffer, true);
|
|
||||||
|
wlr_scene_node_set_enabled(&l->blur->node, true);
|
||||||
|
wlr_scene_blur_set_transparency_mask_source(l->blur, buffer);
|
||||||
|
wlr_scene_blur_set_size(l->blur, l->geom.width, l->geom.height);
|
||||||
|
|
||||||
if (blur_optimized) {
|
if (blur_optimized) {
|
||||||
wlr_scene_buffer_set_backdrop_blur_optimized(buffer, true);
|
wlr_scene_blur_set_should_only_blur_bottom_layer(l->blur, true);
|
||||||
} else {
|
} else {
|
||||||
wlr_scene_buffer_set_backdrop_blur_optimized(buffer, false);
|
wlr_scene_blur_set_should_only_blur_bottom_layer(l->blur, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2202,13 +2199,17 @@ void maplayersurfacenotify(struct wl_listener *listener, void *data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 初始化阴影
|
// 初始化阴影
|
||||||
if (layer_surface->current.exclusive_zone == 0 &&
|
if (layer_surface->current.layer != ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM &&
|
||||||
layer_surface->current.layer != ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM &&
|
|
||||||
layer_surface->current.layer != ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND) {
|
layer_surface->current.layer != ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND) {
|
||||||
l->shadow = wlr_scene_shadow_create(l->scene, 0, 0, border_radius,
|
if (layer_surface->current.exclusive_zone == 0) {
|
||||||
shadows_blur, shadowscolor);
|
l->shadow = wlr_scene_shadow_create(l->scene, 0, 0, border_radius,
|
||||||
wlr_scene_node_lower_to_bottom(&l->shadow->node);
|
shadows_blur, shadowscolor);
|
||||||
wlr_scene_node_set_enabled(&l->shadow->node, true);
|
wlr_scene_node_lower_to_bottom(&l->shadow->node);
|
||||||
|
wlr_scene_node_set_enabled(&l->shadow->node, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
l->blur = wlr_scene_blur_create(l->scene, 0, 0);
|
||||||
|
wlr_scene_node_lower_to_bottom(&l->blur->node);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化动画
|
// 初始化动画
|
||||||
@@ -2224,7 +2225,9 @@ void maplayersurfacenotify(struct wl_listener *listener, void *data) {
|
|||||||
if (!exclusive_focus &&
|
if (!exclusive_focus &&
|
||||||
l->layer_surface->current.keyboard_interactive ==
|
l->layer_surface->current.keyboard_interactive ==
|
||||||
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND) {
|
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND) {
|
||||||
focuslayer(l);
|
focusclient(NULL, 0);
|
||||||
|
client_notify_enter(l->layer_surface->surface,
|
||||||
|
wlr_seat_get_keyboard(seat));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2272,7 +2275,8 @@ void commitlayersurfacenotify(struct wl_listener *listener, void *data) {
|
|||||||
if (!l->noblur &&
|
if (!l->noblur &&
|
||||||
layer_surface->current.layer != ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM &&
|
layer_surface->current.layer != ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM &&
|
||||||
layer_surface->current.layer !=
|
layer_surface->current.layer !=
|
||||||
ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND) {
|
ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND &&
|
||||||
|
l->blur) {
|
||||||
|
|
||||||
wlr_scene_node_for_each_buffer(&l->scene->node,
|
wlr_scene_node_for_each_buffer(&l->scene->node,
|
||||||
iter_layer_scene_buffers, l);
|
iter_layer_scene_buffers, l);
|
||||||
@@ -3610,15 +3614,15 @@ static void iter_xdg_scene_buffers(struct wlr_scene_buffer *buffer, int sx,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (blur && c && !c->noblur) {
|
if (blur && c && !c->noblur) {
|
||||||
wlr_scene_buffer_set_backdrop_blur(buffer, true);
|
wlr_scene_node_set_enabled(&c->blur->node, true);
|
||||||
wlr_scene_buffer_set_backdrop_blur_ignore_transparent(buffer, false);
|
// wlr_scene_blur_set_transparency_mask_source(c->blur, buffer);
|
||||||
if (blur_optimized) {
|
if (blur_optimized) {
|
||||||
wlr_scene_buffer_set_backdrop_blur_optimized(buffer, true);
|
wlr_scene_blur_set_should_only_blur_bottom_layer(c->blur, true);
|
||||||
} else {
|
} else {
|
||||||
wlr_scene_buffer_set_backdrop_blur_optimized(buffer, false);
|
wlr_scene_blur_set_should_only_blur_bottom_layer(c->blur, false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
wlr_scene_buffer_set_backdrop_blur(buffer, false);
|
wlr_scene_node_set_enabled(&c->blur->node, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3733,6 +3737,9 @@ mapnotify(struct wl_listener *listener, void *data) {
|
|||||||
c->shadow = wlr_scene_shadow_create(c->scene, 0, 0, border_radius,
|
c->shadow = wlr_scene_shadow_create(c->scene, 0, 0, border_radius,
|
||||||
shadows_blur, shadowscolor);
|
shadows_blur, shadowscolor);
|
||||||
|
|
||||||
|
c->blur = wlr_scene_blur_create(c->scene_surface, 0, 0);
|
||||||
|
wlr_scene_node_lower_to_bottom(&c->blur->node);
|
||||||
|
|
||||||
wlr_scene_node_lower_to_bottom(&c->shadow->node);
|
wlr_scene_node_lower_to_bottom(&c->shadow->node);
|
||||||
wlr_scene_node_set_enabled(&c->shadow->node, true);
|
wlr_scene_node_set_enabled(&c->shadow->node, true);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user