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

opacify@anish.org - bug fix and minor improvements #451

Merged
merged 3 commits into from Jul 2, 2023

Conversation

NeatNit
Copy link
Contributor

@NeatNit NeatNit commented Feb 10, 2023

  • Use window.set_opacity() instead of window.get_compositor_private().opacity which produces bad results - fixes opacify@anish.org : wrong rendering #417
  • After release, restore the window to its original opacity instead of 100% every time

Note that users can set opacity manually by setting System Settings -> Windows -> Action on title bar with mouse scroll: Adjust opacity (or soon with my WIP extension: https://github.com/NeatNit/cinnamon-opacity-slider). The previous (broken) code did not interfere with this setting as it changed the opacity in a different 'layer', but this PR modifies the same opacity, so must restore it at the end.

I am contemplating taking ownership of this extension, as I see it's currently set to author: none - any feedback on that?

- Use `window.set_opacity()` instead of `window.get_compositor_private().opacity` which produces bad results - fixes linuxmint#417
- After release, restore the window to its original opacity instead of 100% every time
@NeatNit
Copy link
Contributor Author

NeatNit commented Feb 10, 2023

Oops, don't merge yet! I have a small bug: if you let go and quickly grab a window before it had time to become opaque, it will get stuck on the opacity it was when you grabbed it.

I'll work up a fix!

@NeatNit
Copy link
Contributor Author

NeatNit commented Feb 10, 2023

Alright, should be good now - but I am open to any scrutiny.

Edit: come to think of it - this method may not work on older versions of Cinnamon. Is there an easy way to check?

@anaximeno
Copy link
Contributor

anaximeno commented Mar 16, 2023

To avoid breaking the extension on older versions you could create different folders for different versions (Other extensions and applets do this, they may be a good example of what I am talking about).

It works this way:

  • Let's say you have two folders for different versions which are 4.2 and 5.4, how would it work? It would work this way, the 4.2 folder would be used for all cinnamon versions from 4.2 up to the next bigger version that is 5.4, and the 5.4 one would be used for all versions from 5.4 up to the current one until there's another bigger version than that which would be used for newer versions. Since the lower version in your folders is 4.2 then it will be the minimum required version.

@brownsr brownsr merged commit 89f7add into linuxmint:master Jul 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

opacify@anish.org : wrong rendering
3 participants