aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2025-02-18 12:41:22 -0500
committerKenny Levinsen <kl@kl.wtf>2025-02-25 11:11:22 +0100
commit7fab75a7a6d9b2cccfec7741cc59c705b3c40f15 (patch)
tree48ef9e3f09427e8beeb2b116fab040c7d5a35abe
parent0da0d37f3dcbf66befb198fcd221d8345b9814b5 (diff)
commands/opacity: Call output_configure_scene on updated container
Calling container_update() wasn't enough: If there is no visible window decorations (title bar, borders) container_update would basically no-op and the scene wouldn't repaint with the update alpha. By also calling output_configure_scene() we force a call to wlr_scene_buffer_set_opacity() thus ensuring we update the scene. Closes: #8580
-rw-r--r--sway/commands/opacity.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/commands/opacity.c b/sway/commands/opacity.c
index 610cecc6..de058c6b 100644
--- a/sway/commands/opacity.c
+++ b/sway/commands/opacity.c
@@ -2,7 +2,8 @@
#include <stdlib.h>
#include <strings.h>
#include "sway/commands.h"
-#include "sway/tree/view.h"
+#include "sway/tree/container.h"
+#include "sway/output.h"
#include "log.h"
struct cmd_results *cmd_opacity(int argc, char **argv) {
@@ -37,6 +38,7 @@ struct cmd_results *cmd_opacity(int argc, char **argv) {
}
con->alpha = val;
+ output_configure_scene(NULL, &con->scene_tree->node, 1);
container_update(con);
return cmd_results_new(CMD_SUCCESS, NULL);