Skip to content

Commit a90662a

Browse files
committed
Fixed optimized blur not being marked as dirty when no wallpaper is visible
1 parent d0ebafe commit a90662a

File tree

3 files changed

+173
-8
lines changed

3 files changed

+173
-8
lines changed

src/comp/output.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -603,19 +603,14 @@ void comp_output_update_sizes(struct comp_output *output) {
603603
wlr_scene_node_set_position(&output->object.scene_tree->node,
604604
output->geometry.x, output->geometry.y);
605605

606-
// Also marks the blur as dirty
607-
wlr_scene_optimized_blur_set_size(output->layers.optimized_blur_node,
608-
output->geometry.width,
609-
output->geometry.height);
610-
611606
comp_output_arrange_layers(output);
612607
comp_output_arrange_output(output);
613608

614609
// TODO: Update toplevel positions/tiling/sizes Only enable for actual
615610
// outputs
616-
// printf("GEO: %i %i %ix%i\n", output->geometry.width,
617-
// output->geometry.height, output->geometry.x,
618-
// output->geometry.y);
611+
612+
// Also marks the blur as dirty
613+
wlr_scene_optimized_blur_mark_dirty(output->layers.optimized_blur_node);
619614
}
620615

621616
void comp_output_move_workspace_to(struct comp_output *dest_output,
@@ -777,6 +772,12 @@ void comp_output_arrange_output(struct comp_output *output) {
777772
wlr_scene_node_set_enabled(&output->layers.shell_top->node,
778773
!is_fullscreen && !is_locked);
779774
wlr_scene_node_set_enabled(&output->layers.shell_overlay->node, !is_locked);
775+
776+
int output_width, output_height;
777+
wlr_output_effective_resolution(output->wlr_output, &output_width,
778+
&output_height);
779+
wlr_scene_optimized_blur_set_size(output->layers.optimized_blur_node,
780+
output_width, output_height);
780781
}
781782

782783
static void arrange_layer_surfaces(struct comp_output *output,

testing_config.jsonc

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
{
2+
"variables": {
3+
"$terminal": "kitty",
4+
// man 5 sway: /Mod4
5+
"$mod": "Super",
6+
"$layer-effects": {
7+
"blur": {
8+
"enabled": true,
9+
"ignore-transparent": true
10+
},
11+
"shadow": {
12+
"enabled": true
13+
},
14+
"corners": {
15+
"radius": 14,
16+
"round": "ALL"
17+
}
18+
},
19+
"$swaync-layer-effects": {
20+
"blur": {
21+
"enabled": true,
22+
"ignore-transparent": true
23+
}
24+
}
25+
},
26+
"compositor": {
27+
"tiling": {
28+
"split-ratio": 0.5,
29+
"gaps": {
30+
// Should be divided by 2
31+
"inner": 12,
32+
// Should be divided by 2
33+
"outer": 12
34+
}
35+
}
36+
},
37+
"input-devices": {
38+
"mouse": {
39+
40+
},
41+
"trackpad": {
42+
43+
}
44+
},
45+
"outputs": {
46+
// Regex adapter name
47+
"*": {
48+
// Fullscreen tearing
49+
"tearing": true,
50+
// enum: FULLSCREEN, ALWAYS, NEVER
51+
"adaptive-sync": "FULLSCREEN"
52+
}
53+
},
54+
"gestures": {
55+
56+
},
57+
"keymap": {
58+
// Name of keymap
59+
"open terminal": {
60+
"keys": "$mod+Return",
61+
"action": {
62+
"type": "exec",
63+
"command": "$term"
64+
},
65+
"options": {
66+
// Like locked and such...
67+
}
68+
}
69+
},
70+
"appearance": {
71+
"animations": {
72+
"open-close": {
73+
"duration-ms": 250,
74+
"properites": {
75+
"opacity": {
76+
"easing-function": "ease-out"
77+
},
78+
"scale": {
79+
"easing-function": "ease-out",
80+
"open-end-scale": 0.5,
81+
"close-start-scale": 0.5
82+
}
83+
}
84+
},
85+
"resize": {
86+
"duration-ms": 250,
87+
"easing-function": "ease-out",
88+
"properites": {
89+
"opacity": {
90+
"easing-function": "ease-out"
91+
},
92+
"size": {
93+
"easing-function": "ease-out"
94+
}
95+
}
96+
}
97+
},
98+
"effects": {
99+
"blur": {
100+
"enabled": true,
101+
"floating-xray": true,
102+
"ignore-transparent": false,
103+
"radius": 8,
104+
"passes": 3
105+
},
106+
"shadow": {
107+
"enabled": true,
108+
"color": "#00000080",
109+
"blur-sigma": 30,
110+
"offset": {
111+
"x": 0,
112+
"y": 20
113+
}
114+
},
115+
"corners": {
116+
"radius": 14,
117+
// enum:
118+
// ALL, NONE
119+
// TOP, LEFT, RIGHT, BOTTOM
120+
// TOP-LEFT, TOP-RIGHT, BOTTOM-LEFT, BOTTOM-RIGHT
121+
"round": "ALL"
122+
}
123+
},
124+
"toplevel-effects": [
125+
// Regex name(appid/class), title, instance (XWayland)
126+
{
127+
"filter": {
128+
"name": "firefox",
129+
"title": "Picture-in-Picture"
130+
},
131+
"properites": {
132+
"start-floating": true
133+
},
134+
"effects": {
135+
"blur": {
136+
"enabled": true,
137+
"ignore-transparent": true
138+
}
139+
}
140+
}
141+
],
142+
"layer-effects": {
143+
// Regex namespace
144+
"swaync-control-center": {
145+
"effects": "$swaync-layer-effects"
146+
},
147+
"swaync-notification-window": {
148+
"effects": "$swaync-layer-effects"
149+
},
150+
"waybar": {
151+
"effects": "$layer-effects"
152+
},
153+
"swayosd": {
154+
"effects": {
155+
"blur": {
156+
"enabled": true,
157+
"ignore-transparent": true
158+
}
159+
}
160+
}
161+
},
162+
"decorations": {}
163+
}
164+
}

testing_config.lua

Whitespace-only changes.

0 commit comments

Comments
 (0)