Adhesive Windows
A window manager with adhesive functionality would allow windows to be attached to one another along an edge.
The UX I imagine for establishing this adhesion would be similar to MacOS's existing UX of moving/resizing windows and providing a slight friction when it reaches another window's edge. When feeling such friction, allow the user to hold the window there longer to establish adhesion. There will need to be some UI affordance to indicate a connection and provide a way to disconnect: I propose a small pill-shaped handle similar to the one between the two sides of split fullscreen apps in MacOS which can overlap the two window's contents by a pixel or two.
When resizing or moving window A of an attached pair A-B, window B should move to maintain edge connection. If that pushes window B to be off-screen, window B should begin shrinking to avoid the edge of the screen. Once window B reaches its minimum length along the appropriate axis, Window A should either begin to shrink as well or stop moving at all.
Any number of windows should be able to be adhered together in whatever configuration makes the most sense to the user. Because of how this adhesion works, an adhered set of windows A-B-C could cause windows A and C to overlap. This edge-case deservers exploration (likely via implementing and using). I could imagine this being solved in a few ways:
- Forbid groups of more than 2 windows. This would certainly work, but would massively hinder the usefulness of adhesion.
- Forbid adhesion on the top/bottom of windows. This would work decently well and could simplify the implementation at the same time.
- When adhering 3 or more windows together, bind each window with joined edges and forbid overlapping windows within a set of adhered windows.
Applications could leverage this adhesion and pre-attach new windows to existing windows when opening them. This would provide a functionality to application developers that's similar to MacOS's older UI paradigm of "drawers".
Similarly, adhesive windows allows for the concept of detachable panes with little to no effort on the application developer's part. Users are able to construct their preferred UI from existing building blocks.
Taking this feature to the next level could include a way to wrap window adhesion sets together in a window frame, along with a name. Depending on implementation, these layouts could be saved as presets. I haven't thought through the UX of saving or applying adhesion layouts beyond this, but I believe there's room for expanding the feature in that direction.