cinnamon-maximus@fmete: Fix broken window ID getter #430
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
get_xwindow no longer exists so guessWindowXID always fails and falls back to using the window title, which always selects the bottom-most window of a given title where multiple windows exist with the same title.
Replacing it with get_description gets the correct ID and yields the correct behavior of decorating and undecorating the currently focused window
I also added the exception message to the log message to make debugging in the future easier should the API change again
Also added a comment for a potential workaround that would be agnostic to the cinnamon extension API changing which would utilize an external call to xprop to get the active window ID which might be preferred considering this extension already depends on an external call to xprop anyway. Let me know if you'd rather I implement that version
Using Cinnamon 5.4.12 on Mint 21
Fixes #428