-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Windows snap hotkeys to move windows between screens #1603
Windows snap hotkeys to move windows between screens #1603
Conversation
Todo: Add new unit tests which are checking modified API behavior. I've just updated current ones so they don't crash. |
When making changes/adding unit tests, please add @SeraphimaZ as a reviewer. |
With three monitors like this, where the monitor number 2 is the primary monitor Win+right arrow moves the window from monitor 2 to monitor 1 and then to monitor 3. These are the coordinates of the three monitors: The sorting algorithm should be reversed, because it currently puts the monitor with the higher left coordinate in first position, so the current order is 3-2-1. |
This shouldn't be approved then until this acts like aero snap. We need to know the L and R virtual monitors to send window to. |
@crutkas |
How are we going to test private methods? |
Nevermind, I extracted the critical method (the one that should undergo tests) as a separate Util method, so we can test it. My code will take care of ordering monitors. |
* Implemented improved monitor ordering v1 * Fixed some embarrassing bugs, added some tests * Added one more test * Extracted a value to a variable * ASCII art in unit test comments describing monitor layouts * Removed empty line for consistency * Update comment to match the code * Refactored tests, added tests for X,Y offsets
I tested with different 3 monitor layouts, and it behaves similarly to Windows Snap. |
Summary of the Pull Request
We currently support using WIN + ARROW key to move window through zones inside zone layout on one monitor. This pull requests improves that functionality, allowing movement to be performed in multi monitor scenario.
PR Checklist