Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add window transparency effect #864

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

jackssrt
Copy link

@jackssrt jackssrt commented Nov 24, 2024

This PR adds a window transparency effect. The effect can be enabled in the window_effects config, or it can be manually invoked with an app command.

Some UX concerns

Not enabling the effect in both the focused_windows and other_windows effect config will cause GlazeWM to just leave the transparency applied by the enabled one be.
If the user uses the app command to change the transparency, the window effect will override the manual transparency change the next time it updates.
Some users might not expect this behavior.

Code architecture problem

I wrote a TODO comment about using saturating_sub_signed when it's stable. Since we use nightly, we can simply enable it, but I don't know if that's okay with everyone. Also, that would entail using a bigger int type, since i8 is between -128 and 128. Maybe it's best just to keep using a boolean for the sign? Perhaps we could use an enum somehow?
It would also be nice if we could write this once and then have every command use the same system for handling delta values.

packages/wm/src/common/commands/platform_sync.rs Outdated Show resolved Hide resolved
resources/assets/sample-config.yaml Outdated Show resolved Hide resolved
packages/wm/src/common/transparency_value.rs Outdated Show resolved Hide resolved
packages/wm/src/common/transparency_value.rs Outdated Show resolved Hide resolved
packages/wm/src/common/platform/native_window.rs Outdated Show resolved Hide resolved
packages/wm/src/common/platform/native_window.rs Outdated Show resolved Hide resolved
packages/wm/src/common/transparency_value.rs Outdated Show resolved Hide resolved
@jackssrt jackssrt force-pushed the feat-add-window-transparency-effect branch from e14e363 to 9009457 Compare December 4, 2024 17:25
@jackssrt
Copy link
Author

jackssrt commented Dec 4, 2024

Git is confusing... Sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📬 Needs triage
Development

Successfully merging this pull request may close these issues.

2 participants