Open
Conversation
Testing revealed that "windows" is a list of HWNDs in Z order. This list excluded the current active window. The loop that was here previously was simply selecting the last item in the list. This takes advantage of vector methods to skip all the middlemen. Additionally, we're now using the second hotkey to go to the previously selected window.
|
It seems that Alt+Shift+` keeps cycling between the last two windows instead of cycling all windows backwards. Is that intentional? |
Author
Not so much intentional as it was the best I could do without having to take a very different approach. Going backwards takes the second highest item in the z-order and puts it on top. The item that was on top then goes automatically to the second item on the z-order. To do any better would require either stuff I'm not aware of or more work than I was willing to do at that moment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds a second hotkey "ALT+SHIFT+backtick" that navigates to back to the previous highest z-order window. This kind of adds what was being requested in #2, though not quite.
This also refactors things a bit to remove a for_each loop that was confusing me.