Integrates commits c85a455e and 2f9c63b0 from extra/sway.
Copied from c85a455e:
> As of version 1.17, xdg-desktop-portal requires desktops to declare
> which portals should be used. For Sway, this requires a file
> /usr/share/xdg-desktop-portal/sway-portals.conf (or a local user
> config).
>
> A reasonable default is to use GTK for the file picker (as wlr doesn't
> have file picker support) and wlr for screencast/screenshot support.
> Fedora does this similarly. [1]
>
> Upstream is not interested in shipping a configuration file [2] so we
> need to do it downstream.
>
> [1] https://src.fedoraproject.org/rpms/sway/blob/rawhide/f/sway-portals.conf
> [2] https://github.com/swaywm/sway/issues/7773c85a455eb62f9c63b053
* refactor: removed surface_width + surface_height from render_blur()
* Fixed scaling issues
* Minor refactors
* removed scaled_dst box
* removed uneeded fb bind
* removed unneeded src_box
* removed unneeded wlr_fbox_from_box function
* removed src_box
* Don't scale the blur translucent region twice
* Renamed extended_damage to original_damage to reflect better what it actually is
* Removed unneeded clearing of the wlr fbo before rendering onto it
* Removed the need for our own main FBO, also fixes some damage bugs
* Simplified detection of blur on workspace
* cleaned up comments
---------
Co-authored-by: Erik Reider <35975961+ErikReider@users.noreply.github.com>
The blur rendering logic includes the optimization to render blur only
for transparent surfaces. This patch considers surfaces as transparent
also when the transparency is only introduced by the dim color.
We can now have windows, that are opaque by default become transparent
with blurred background as soon as they loose focus.
Example configuration:
```
blur on
blur_passes 3
blur_radius 5
default_dim_inactive 0.15
dim_inactive_colors.unfocused #00000000
```
* Move stencil into each framebuffer
Also fixes the stencil being added to the wrong framebuffer
* Initialize texture members on framebuffer init
* removed bind arg
* renamed init to create, changed existing create to update
* moved stencil buffer creation to new function
* removed some now misleading comments
---------
Co-authored-by: William McKinnon <contact@willmckinnon.com>
* suplified conditional in find_con_effect_iterator
* removed has_blur
* simplified optimized blur check
* moved damage expansion to output.c
* removed extraneous fx_renderer_scissor
* cleaned up render_output
* removed unneeded damage scale
* moved workspace optimized check function to workspace.c
* renamed ws iterator function
* added back region expansion
* removed uneeded parameter from get_main_buffer_blur
* returned extended damage
* moved get_blur_size back to original spot (reduce diff size)
* Fixed blur artifacting
* Fixed damage highlight not clearing correct framebuffer
* removed unneeded conditional
* moved initial damage expansion to output.c
* moved extended damage to the top of output_render
* moved blur damage to damage_surface_iterator
* ensure damage doesnt expand beyond output size
* removed stdint import
---------
Co-authored-by: Erik Reider <ereider20010103@gmail.com>