From cbfb7af7fd4728f993124e81f8666a2e8cee6085 Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Mon, 17 Apr 2023 23:24:48 +0200 Subject: Add kawase blur (#120) Co-authored-by: Erik Reider Co-authored-by: Will McKinnon --- sway/commands/blur_xray.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sway/commands/blur_xray.c (limited to 'sway/commands/blur_xray.c') diff --git a/sway/commands/blur_xray.c b/sway/commands/blur_xray.c new file mode 100644 index 00000000..045566d0 --- /dev/null +++ b/sway/commands/blur_xray.c @@ -0,0 +1,25 @@ +#include "sway/commands.h" +#include "sway/config.h" +#include "sway/output.h" +#include "util.h" + +struct cmd_results *cmd_blur_xray(int argc, char **argv) { + struct cmd_results *error = checkarg(argc, "blur_xray", EXPECTED_AT_LEAST, 1); + + if (error) { + return error; + } + + bool result = parse_boolean(argv[0], config->blur_xray); + config->blur_xray = result; + + struct sway_output *output; + wl_list_for_each(output, &root->all_outputs, link) { + if (output->renderer) { + output->renderer->blur_buffer_dirty = true; + output_damage_whole(output); + } + } + + return cmd_results_new(CMD_SUCCESS, NULL); +} -- cgit v1.2.3