timgott / wayfire-shadows Goto Github PK
View Code? Open in Web Editor NEWWayfire plugin that adds window shadows
License: MIT License
Wayfire plugin that adds window shadows
License: MIT License
Hello! I'm currently experiencing a problem where no matter what I do, shadows do not appear. I've tried both client side and server side decoration, enabled and disabled the decorations plugin, added wayfire-plugins-extra and tried without, tried different versions of wayfire altogether (I'm currently using the July 30th, 2023 git branch), etc.
Still however, shadows and glow never work. I've never gotten it to work no matter the config. Is there some dependency needed or config I'm missing?
Only reproduction I know:
Crashes with segfault while trying to check a config option during the focus change handling, how can this happen?
The focus handling in this plugin is not very reliable anyways but it cannot be improved until WayfireWM/wayfire#1413
[winshadows]
clip_shadow_inside = false
enabled_views = type is "toplevel" & floating is true & maximized is false
glow_color = \#3584E4FF
glow_emissivity = 1.000000
glow_enabled = false
glow_intensity = 0.500000
glow_radius = 0
glow_radius_limit = 150
glow_spread = 8.000000
glow_threshold = 0.030000
horizontal_offset = 0
include_undecorated_views = true
shadow_color = \#00000099
shadow_emissiveness = 0.000000
shadow_radius = 100
vertical_offset = 0
maximized windows still have shadows
It happens to when a window is unmaximized and then get maximized, there is no issue if window created as maximized by default
It would be great if there was an option to apply shadows for the view that is currently active.
Anticipating incoming issues about build errors that are caused by changes in Wayfire master, it is possible that this plugin will not compile until the 0.8 release of Wayfire.
PRs to catch up to new developments are always welcome.
The backport0.7 branch still works with Wayfire 0.7 if you want something stable.
With any value I try in wayfire.ini
I get this message, even with the default value. Maybe I'm missing something. Latest git.
353 [winshadows]
354 include_undecorated_views = true
355 shadow_color = #00000070
356 shadow_radius = 50
357 vertical_offset = 10
358 horizontal_offset = 5
`journalctl`
`mar 04 08:07:09 wayfire[938000]: EE 04-03-23 08:07:09.567 - [src/file.cpp:340] Error in file /home/stef/.config/lxqt-wayland/wayfire.ini:355, invalid option value!
`
Would you be willing to add this to https://github.com/wayfirewm/wayfire-plugins-extra ?
It appears that sometimes, the shadow subsurface gets drawn on top of the decoration subsurface. So when I use a solid color (without alpha) my titlebar gets completely coloured and my transparent terminal becomes opaque. A simple solution for this would be to as Javyre told, you can "exclude the wm_geometry from the regions you're painting to"
PS: @timgott I really don't have much experience with glsl or painting using opengl. It would be great if you could join us on matrix. You'll get good help there.
when compliling
ninja -C build && sudo ninja -C build install
[1/5] Compiling C++ object libwinshadows.so.p/shadow-surface.cpp.o
FAILED: libwinshadows.so.p/shadow-surface.cpp.o
c++ -Ilibwinshadows.so.p -I. -I.. -I/usr/include/libdrm -I/usr/include/pixman-1 -I/usr/include/libevdev-1.0 -I/usr/include/libxml2 -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -std=c++17 -O3 -DWLR_USE_UNSTABLE -DWAYFIRE_PLUGIN -fPIC -pthread -MD -MQ libwinshadows.so.p/shadow-surface.cpp.o -MF libwinshadows.so.p/shadow-surface.cpp.o.d -o libwinshadows.so.p/shadow-surface.cpp.o -c ../shadow-surface.cpp
In file included from ../shadow-surface.hpp:13,
from ../shadow-surface.cpp:1:
../deco-shadow.hpp:4:10: fatal error: wayfire/region.hpp: no such file or directory
4 | #include <wayfire/region.hpp>
Current screenshots do not use the new inverse square falloff glow, and the option names are not correct anymore
Without this patch, the shadows plugin fails with the following output:
In file included from ../subprojects/wayfire-shadows/deco-shadow.cpp:1:
../subprojects/wayfire-shadows/deco-shadow.hpp:17:13: error: ‘region_t’ in namespace ‘wf’ does not name a type
17 | wf::region_t calculate_region() const;
| ^~~~~~~~
../subprojects/wayfire-shadows/deco-shadow.cpp:105:5: error: ‘region_t’ in namespace ‘wf’ does not name a type
105 | wf::region_t wf::windecor::decoration_shadow_t::calculate_region() const {
| ^~~~~~~~
when i try to build i get an incredibly long error that i don't understand in the least, i can send the error message but as i said it's very long
Thanks for the plugin!
I found two problems:
#include <wayfire/region.hpp>
should be removed from deco-shadow.hpp
.wf::windecor::decoration_shadow_t
:wf::windecor::decoration_shadow_t::~decoration_shadow_t() {
OpenGL::render_begin();
program.free_resources();
OpenGL::render_end();
}
Hi,
Nice plugin.
Just one small problem, when the blur plugin is active, blurring is also applied to shadows, which looks wrong.
Can this be prevented?
Hey there,
I really like this plugin, though I'm not a big fan of installing stuff directly from source as I tend to lose track of these files over time.
Could you create an aur package for this (Or maybe for lure?)
Thanks!
meson build --buildtype=release
....
meson.build:16:0: ERROR: Dependency "wayfire" not found, tried pkgconfig and cmake
Same error for wf-config. Tried also with meson --prefix /usr/local/
. Wayfire compiled from source.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.