Merge remote-tracking branch 'origin/master' into fade-animations
This commit is contained in:
commit
ae12a9cb13
6 changed files with 18 additions and 83 deletions
56
.github/workflows/AUR_publish.yml
vendored
56
.github/workflows/AUR_publish.yml
vendored
|
@ -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
|
|
10
README.md
10
README.md
|
@ -38,17 +38,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_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 <integer value 0 - 10>`
|
- `blur_passes <integer value 0 - 10>`
|
||||||
- `blur_radius <integer value 0 - 10>`
|
- `blur_radius <integer value 0 - 10>`
|
||||||
- `blur_noise <float value 0 - 1>` (**Note**: git only, percentage of noise to add)
|
- `blur_noise <float value 0 - 1>`
|
||||||
- `blur_brightness <float value 0 - 2>` (**Note**: git only, percentage of original brightness to adjust)
|
- `blur_brightness <float value 0 - 2>`
|
||||||
- `blur_contrast <float value 0 - 2>` (**Note**: git only, percentage of original contrast to adjust)
|
- `blur_contrast <float value 0 - 2>`
|
||||||
- `blur_saturation <float value 0 - 2>` (**Note**: git only, percentage of original saturation to adjust)
|
- `blur_saturation <float value 0 - 2>`
|
||||||
+ Corner radius: `corner_radius <val>`
|
+ Corner radius: `corner_radius <val>`
|
||||||
+ Window shadows:
|
+ Window shadows:
|
||||||
- `shadows enable|disable`
|
- `shadows enable|disable`
|
||||||
- `shadows_on_csd enable|disable` (**Note**: The shadow might not fit some windows)
|
- `shadows_on_csd enable|disable` (**Note**: The shadow might not fit some windows)
|
||||||
- `shadow_blur_radius <integer value 0 - 100>`
|
- `shadow_blur_radius <integer value 0 - 100>`
|
||||||
- `shadow_color <hex color with alpha> ex, #0000007F`
|
- `shadow_color <hex color with alpha> ex, #0000007F`
|
||||||
- `shadow_offset <x offset> <y offset>` (**Note**: git only)
|
- `shadow_offset <x offset> <y offset>`
|
||||||
- `shadow_inactive_color <hex color with alpha> ex, #0000007F`
|
- `shadow_inactive_color <hex color with alpha> ex, #0000007F`
|
||||||
+ LayerShell effects (to blur panels / notifications etc):
|
+ LayerShell effects (to blur panels / notifications etc):
|
||||||
- `layer_effects <layer namespace> <effects>`
|
- `layer_effects <layer namespace> <effects>`
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
let
|
let
|
||||||
mkPackage = pkgs: {
|
mkPackage = pkgs: {
|
||||||
swayfx-unwrapped =
|
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: {
|
(old: {
|
||||||
version = "0.4.0-git";
|
version = "0.4.0-git";
|
||||||
src = pkgs.lib.cleanSource ./.;
|
src = pkgs.lib.cleanSource ./.;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
project(
|
project(
|
||||||
'sway',
|
'sway',
|
||||||
'c',
|
'c',
|
||||||
version: '0.3.3',
|
version: '0.4',
|
||||||
license: 'MIT',
|
license: 'MIT',
|
||||||
meson_version: '>=0.60.0',
|
meson_version: '>=0.60.0',
|
||||||
default_options: [
|
default_options: [
|
||||||
|
|
|
@ -1604,9 +1604,6 @@ void output_render(struct fx_render_context *ctx) {
|
||||||
struct sway_output *output = ctx->output;
|
struct sway_output *output = ctx->output;
|
||||||
pixman_region32_t *damage = ctx->output_damage;
|
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 fx_effect_framebuffers *effect_fbos = ctx->pass->fx_effect_framebuffers;
|
||||||
|
|
||||||
struct sway_workspace *workspace = output->current.active_workspace;
|
struct sway_workspace *workspace = output->current.active_workspace;
|
||||||
|
@ -1621,7 +1618,7 @@ void output_render(struct fx_render_context *ctx) {
|
||||||
|
|
||||||
if (!pixman_region32_not_empty(damage)) {
|
if (!pixman_region32_not_empty(damage)) {
|
||||||
// Output isn't damaged but needs buffer swap
|
// Output isn't damaged but needs buffer swap
|
||||||
goto renderer_end;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug.damage == DAMAGE_HIGHLIGHT) {
|
if (debug.damage == DAMAGE_HIGHLIGHT) {
|
||||||
|
@ -1632,6 +1629,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);
|
pixman_region32_copy(&transformed_damage, damage);
|
||||||
transform_output_damage(&transformed_damage, wlr_output);
|
transform_output_damage(&transformed_damage, wlr_output);
|
||||||
|
|
||||||
|
@ -1727,17 +1727,9 @@ void output_render(struct fx_render_context *ctx) {
|
||||||
// copy the surrounding content where the blur would display artifacts
|
// copy the surrounding content where the blur would display artifacts
|
||||||
// and draw it above the artifacts
|
// and draw it above the artifacts
|
||||||
|
|
||||||
// ensure that the damage isn't expanding past the output's size
|
// Expand the original damage to compensate for surrounding
|
||||||
int32_t damage_width = damage->extents.x2 - damage->extents.x1;
|
// blurred views to avoid sharp edges between damage regions
|
||||||
int32_t damage_height = damage->extents.y2 - damage->extents.y1;
|
wlr_region_expand(damage, damage, config_get_blur_size());
|
||||||
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());
|
|
||||||
}
|
|
||||||
|
|
||||||
pixman_region32_t extended_damage;
|
pixman_region32_t extended_damage;
|
||||||
pixman_region32_init(&extended_damage);
|
pixman_region32_init(&extended_damage);
|
||||||
|
@ -1755,6 +1747,10 @@ void output_render(struct fx_render_context *ctx) {
|
||||||
pixman_region32_union(damage, damage, &extended_damage);
|
pixman_region32_union(damage, damage, &extended_damage);
|
||||||
pixman_region32_fini(&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
|
// Capture the padding pixels before blur for later use
|
||||||
fx_renderer_read_to_buffer(ctx->pass, &effect_fbos->blur_padding_region,
|
fx_renderer_read_to_buffer(ctx->pass, &effect_fbos->blur_padding_region,
|
||||||
effect_fbos->blur_saved_pixels_buffer,
|
effect_fbos->blur_saved_pixels_buffer,
|
||||||
|
|
|
@ -209,11 +209,6 @@ bool server_init(struct sway_server *server) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!server->backend) {
|
|
||||||
sway_log(SWAY_ERROR, "Unable to create backend");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
server->renderer = fx_renderer_create(server->backend);
|
server->renderer = fx_renderer_create(server->backend);
|
||||||
if (!server->renderer) {
|
if (!server->renderer) {
|
||||||
sway_log(SWAY_ERROR, "Failed to create fx_renderer");
|
sway_log(SWAY_ERROR, "Failed to create fx_renderer");
|
||||||
|
|
Loading…
Add table
Reference in a new issue