File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 8
8
#include <wlr/render/swapchain.h>
9
9
#include <wlr/render/wlr_renderer.h>
10
10
#include <wlr/types/wlr_buffer.h>
11
+ #include <wlr/types/wlr_alpha_modifier_v1.h>
11
12
#include <wlr/types/wlr_gamma_control_v1.h>
12
13
#include <wlr/types/wlr_matrix.h>
13
14
#include <wlr/types/wlr_output_layout.h>
@@ -216,6 +217,15 @@ static void output_configure_scene(struct sway_output *output,
216
217
217
218
if (node -> type == WLR_SCENE_NODE_BUFFER ) {
218
219
struct wlr_scene_buffer * buffer = wlr_scene_buffer_from_node (node );
220
+ struct wlr_scene_surface * surface = wlr_scene_surface_try_from_buffer (buffer );
221
+
222
+ if (surface ) {
223
+ const struct wlr_alpha_modifier_surface_v1_state * alpha_modifier_state =
224
+ wlr_alpha_modifier_v1_get_surface_state (surface -> surface );
225
+ if (alpha_modifier_state != NULL ) {
226
+ opacity *= (float )alpha_modifier_state -> multiplier ;
227
+ }
228
+ }
219
229
220
230
// hack: don't call the scene setter because that will damage all outputs
221
231
// We don't want to damage outputs that aren't our current output that
You can’t perform that action at this time.
0 commit comments