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

Add new feature, drag and drop window arrangement #44

Merged
merged 22 commits into from
Apr 26, 2020

Conversation

takagiy
Copy link
Contributor

@takagiy takagiy commented Apr 24, 2020

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.

small-pat1-1 small-pat1-2 small-pat1-3

2 Insertion (Outer)

When a window is released on the side of the continer, the wm inserts the window beside the container.

small-pat2-1 small-pat2-2

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.

small-pat3

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.

small-pat4

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.

area-map

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!

takagiy added 22 commits April 16, 2020 14:35
…ntuitive (do not make new container if the container with desired tiling-direction already exists)
@aesophor
Copy link
Owner

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!

@aesophor aesophor merged commit 2c5d06f into aesophor:master Apr 26, 2020
@aesophor aesophor linked an issue Apr 26, 2020 that may be closed by this pull request
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.

[feature] Drag and Drop window arrangement
2 participants