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

When I switch desktops, the transparency setting will become invalid #397

Closed
gileli121 opened this issue Nov 24, 2024 Discussed in #396 · 4 comments
Closed

When I switch desktops, the transparency setting will become invalid #397

gileli121 opened this issue Nov 24, 2024 Discussed in #396 · 4 comments
Labels
bug Something isn't working Feature-Opacity fixed

Comments

@gileli121
Copy link
Member

Discussed in #396

Originally posted by summerxiaohao November 22, 2024
Snipaste_2024-11-22_10-09-59
When I set up and use two desktops in the Windows system, I set the transparency and top setting for a program on Desktop 1. If I switch to Desktop 2 and then back to Desktop 1, after repeating this several times, the transparency I set for the program on Desktop 1 will become invalid and return to its default value.
My version: v5.25.1

Snipaste_2024-11-22_10-19-39

Snipaste_2024-11-22_10-19-59

@gileli121 gileli121 added bug Something isn't working Feature-Opacity labels Nov 24, 2024
@gileli121
Copy link
Member Author

This is an interesting and unexpected bug.

I was able to reproduce it very easily and will work on a fix, likely today or the day after.

@gileli121
Copy link
Member Author

When the issue occurs, the logic to apply a saved window configuration is mistakenly triggered. In the reported case, the customer had saved a configuration with only opacity enabled at a specific level. This same issue can arise with other features enabled via saved configurations, such as "always on top."

For example, a window might regain the "always-on-top" status after the user returns to the virtual desktop where the window is located because this feature was enabled in the saved configuration.

Steps to Reproduce:

  1. Save a configuration: Enable a feature (e.g., opacity) and save the configuration (the configuration will also include the current opacity level).

  2. Change the feature settings: Modify the opacity level to a different value.

  3. Switch virtual desktops: Move to another virtual desktop.

    • At this point, the window manager adds the window reference to the unlisted-windows list.
  4. Return to the original virtual desktop:

    • The window manager pulls the reference from the unlisted-windows list and adds it back to the regular list. However, the OnWindowAdded logic is triggered, which executes the ApplySavedConfigurations logic and applies the saved settings.

The fix

The code should differentiate between:

  • A truly new window being created, and
  • An existing window being reloaded.

For cases where the window is only being loaded again (not newly created), the OnWindowAdded logic should be skipped. Adjusting the window manager logic to avoid doing it when window just reloaded will prevent this issue

@gileli121
Copy link
Member Author

gileli121 commented Nov 24, 2024

Fixed in 5.25.2

Download

Currently marked as a pre-release until proven stable.

@gileli121
Copy link
Member Author

Released in 5.25.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Feature-Opacity fixed
Projects
None yet
Development

No branches or pull requests

1 participant