From a5a69d4d4e9a8fe306e27ca46cde3a8b9d312ae3 Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Mon, 22 Apr 2024 23:41:51 +0200 Subject: [PATCH 1/5] fix: gray background rect not being expanded by blur size (#295) --- sway/desktop/render.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 65bf2062..30f1c541 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -1592,9 +1592,6 @@ void output_render(struct fx_render_context *ctx) { struct sway_output *output = ctx->output; pixman_region32_t *damage = ctx->output_damage; - pixman_region32_t transformed_damage; - pixman_region32_init(&transformed_damage); - struct fx_effect_framebuffers *effect_fbos = ctx->pass->fx_effect_framebuffers; struct sway_workspace *workspace = output->current.active_workspace; @@ -1609,7 +1606,7 @@ void output_render(struct fx_render_context *ctx) { if (!pixman_region32_not_empty(damage)) { // Output isn't damaged but needs buffer swap - goto renderer_end; + return; } if (debug.damage == DAMAGE_HIGHLIGHT) { @@ -1620,6 +1617,9 @@ void output_render(struct fx_render_context *ctx) { }, }); } + + pixman_region32_t transformed_damage; + pixman_region32_init(&transformed_damage); pixman_region32_copy(&transformed_damage, damage); transform_output_damage(&transformed_damage, wlr_output); @@ -1715,17 +1715,9 @@ void output_render(struct fx_render_context *ctx) { // copy the surrounding content where the blur would display artifacts // and draw it above the artifacts - // ensure that the damage isn't expanding past the output's size - int32_t damage_width = damage->extents.x2 - damage->extents.x1; - int32_t damage_height = damage->extents.y2 - damage->extents.y1; - if (damage_width > output_width || damage_height > output_height) { - pixman_region32_intersect_rect(damage, damage, - 0, 0, output_width, output_height); - } else { - // Expand the original damage to compensate for surrounding - // blurred views to avoid sharp edges between damage regions - wlr_region_expand(damage, damage, config_get_blur_size()); - } + // Expand the original damage to compensate for surrounding + // blurred views to avoid sharp edges between damage regions + wlr_region_expand(damage, damage, config_get_blur_size()); pixman_region32_t extended_damage; pixman_region32_init(&extended_damage); @@ -1743,6 +1735,10 @@ void output_render(struct fx_render_context *ctx) { pixman_region32_union(damage, damage, &extended_damage); pixman_region32_fini(&extended_damage); + // Copy the new extended damage into the transformed damage + pixman_region32_copy(&transformed_damage, damage); + transform_output_damage(&transformed_damage, wlr_output); + // Capture the padding pixels before blur for later use fx_renderer_read_to_buffer(ctx->pass, &effect_fbos->blur_padding_region, effect_fbos->blur_saved_pixels_buffer, From 80c0c506730fa05ab86555219be177dad14eb5c6 Mon Sep 17 00:00:00 2001 From: William McKinnon Date: Mon, 29 Apr 2024 01:32:54 -0400 Subject: [PATCH 2/5] removed old publish script, updated to 0.4 --- .github/workflows/AUR_publish.yml | 56 ------------------------------- meson.build | 2 +- 2 files changed, 1 insertion(+), 57 deletions(-) delete mode 100644 .github/workflows/AUR_publish.yml diff --git a/.github/workflows/AUR_publish.yml b/.github/workflows/AUR_publish.yml deleted file mode 100644 index 2b768c5a..00000000 --- a/.github/workflows/AUR_publish.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Package for the AUR - -on: - release: - types: [published] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: -jobs: - aur-publish-stable: - runs-on: ubuntu-latest - steps: - - name: Check out sources - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Publish AUR Stable package - uses: ulises-jeremias/github-actions-aur-publish@v1 - with: - pkgname: swayfx - pkgbuild: ./build-scripts/aur/PKGBUILD - assets: | - ./build-scripts/aur/sway-portals.conf - ./build-scripts/aur/50-systemd-user.conf - ./build-scripts/aur/sway.install - commit_username: ${{ secrets.AUR_USERNAME }} - commit_email: ${{ secrets.AUR_EMAIL }} - ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} - commit_message: Update AUR package - ssh_keyscan_types: rsa,dsa,ecdsa,ed25519 - update_pkgver: false - - aur-publish-git: - runs-on: ubuntu-latest - steps: - - name: Check out sources - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Publish AUR -git package - uses: ulises-jeremias/github-actions-aur-publish@v1 - with: - pkgname: swayfx-git - pkgbuild: ./build-scripts/aur-git/PKGBUILD - assets: | - ./build-scripts/aur/sway-portals.conf - ./build-scripts/aur-git/50-systemd-user.conf - ./build-scripts/aur-git/sway.install - commit_username: ${{ secrets.AUR_USERNAME }} - commit_email: ${{ secrets.AUR_EMAIL }} - ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} - commit_message: Update AUR package - ssh_keyscan_types: rsa,dsa,ecdsa,ed25519 - update_pkgver: false diff --git a/meson.build b/meson.build index 2ab72e13..d5086804 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'sway', 'c', - version: '0.3.3', + version: '0.4', license: 'MIT', meson_version: '>=0.60.0', default_options: [ From c6b4411b86b76e45b8ba23e92697325f182564f2 Mon Sep 17 00:00:00 2001 From: William McKinnon Date: Mon, 29 Apr 2024 02:09:52 -0400 Subject: [PATCH 3/5] Removed git only messages --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0376baf0..2a5d4033 100644 --- a/README.md +++ b/README.md @@ -30,17 +30,17 @@ Sway is an incredible window manager, and certainly one of the most well establi - `blur_xray enable|disable`: this will set floating windows to blur based on the background, not the windows below. You probably want to set this to `disable` :) - `blur_passes ` - `blur_radius ` - - `blur_noise ` (**Note**: git only, percentage of noise to add) - - `blur_brightness ` (**Note**: git only, percentage of original brightness to adjust) - - `blur_contrast ` (**Note**: git only, percentage of original contrast to adjust) - - `blur_saturation ` (**Note**: git only, percentage of original saturation to adjust) + - `blur_noise ` + - `blur_brightness ` + - `blur_contrast ` + - `blur_saturation ` + Corner radius: `corner_radius ` + Window shadows: - `shadows enable|disable` - `shadows_on_csd enable|disable` (**Note**: The shadow might not fit some windows) - `shadow_blur_radius ` - `shadow_color ex, #0000007F` - - `shadow_offset ` (**Note**: git only) + - `shadow_offset ` - `shadow_inactive_color ex, #0000007F` + LayerShell effects (to blur panels / notifications etc): - `layer_effects ` From e45b420ccc888f4d14782f233cf037941a2425db Mon Sep 17 00:00:00 2001 From: Eric Chastain Date: Tue, 30 Apr 2024 23:38:49 -0400 Subject: [PATCH 4/5] Update server.c removing duplicated code block (#306) --- sway/server.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sway/server.c b/sway/server.c index 2b5b8d0f..c4b98d22 100644 --- a/sway/server.c +++ b/sway/server.c @@ -140,11 +140,6 @@ bool server_init(struct sway_server *server) { return false; } - if (!server->backend) { - sway_log(SWAY_ERROR, "Unable to create backend"); - return false; - } - server->renderer = fx_renderer_create(server->backend); if (!server->renderer) { sway_log(SWAY_ERROR, "Failed to create fx_renderer"); From d4f8c9d0b860e52ee32ab5f6a375b55383614fd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85smund=20Balke?= <77496597+balkenix@users.noreply.github.com> Date: Wed, 8 May 2024 04:50:33 +0100 Subject: [PATCH 5/5] update wlroots (#312) --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 21314d67..ab9a3871 100644 --- a/flake.nix +++ b/flake.nix @@ -14,7 +14,7 @@ let mkPackage = pkgs: { swayfx-unwrapped = - (pkgs.swayfx-unwrapped.override { wlroots_0_16 = pkgs.wlroots_0_17; }).overrideAttrs + (pkgs.swayfx-unwrapped.override { wlroots = pkgs.wlroots_0_17; }).overrideAttrs (old: { version = "0.4.0-git"; src = pkgs.lib.cleanSource ./.;