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

Alt shift backtick #14

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

Conversation

chandlercv
Copy link

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.

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.
@Gehock
Copy link

Gehock commented Sep 28, 2023

It seems that Alt+Shift+` keeps cycling between the last two windows instead of cycling all windows backwards. Is that intentional?

@chandlercv
Copy link
Author

Is that intentional?

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.

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.

2 participants