-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add new feature, drag and drop window arrangement #44
Merged
aesophor
merged 22 commits into
aesophor:master
from
takagiy:wm-move-window-by-drag-and-drop
Apr 26, 2020
Merged
Add new feature, drag and drop window arrangement #44
aesophor
merged 22 commits into
aesophor:master
from
takagiy:wm-move-window-by-drag-and-drop
Apr 26, 2020
Conversation
This file contains 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
…ntuitive (do not make new container if the container with desired tiling-direction already exists)
Love this! This is a well-developed and well-tested patch. I really appreciate your hard work and support, especially the documentation with videos. Thank you again! |
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.
Overview
This request is to add a new feature to this wm that lets windows be arranged by drag-and-drop. (re: #43)
With this, the wm will be able to move the drag-and-drop-ed window to the position where seems to be most intuitive according to the position where the window was released.
We consider four cases to select to where move the window.
Container
To make explanation easy before our looking up the four cases, I'll introduce the concept of containers.
We call it container that is a sequence of windows (or other intenal containers) which are tiled vertically or horizontally.
That is the containers are equivalent to the internal/root nodes in the client tree.
Arrangement Methods
1 Insertion (Inner)
When a window is released near the spaces between windows in the container or the end of the container,
the wm inserts the window to the container.
2 Insertion (Outer)
When a window is released on the side of the continer, the wm inserts the window beside the container.
3 Splitting
When a window is released on the middle (neither center nor edge) area of another tiling window,
the wm replaces the window with a new container containing those two windwos.
4 Swapping
When a window is released on the center of another window or on the another floating window, then the wm swaps those two windows.
Hint of Inside
Discussing more formally, we divide the window (and gaps around it) into some areas to determinate how to move the dropped window as shown below.
Assuming that the window is tiled horizontally, then the red area causes the first pattern we discussed above, the orrange area causes the second pattern, the green or blue areas cause the third, and the yellow causes the fourth.
Thank you!