mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[PR #1370] [MERGED] feat: floating windows improved #1361
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/LGUG2Z/komorebi/pull/1370
Author: @alex-ds13
Created: 3/21/2025
Status: ✅ Merged
Merged: 3/26/2025
Merged by: @LGUG2Z
Base:
master← Head:feat/focus-floating-improved📝 Commits (5)
d266429feat(wm): track focused floating window1023e64feat(wm): focus floats depending on direction28a00f6feat(wm): show float windows in order on layer toggle4429427fix(test): fix test_locked_containers_toggle_float414d208refactor: comment the new ring implementation📊 Changes
6 files changed (+364 additions, -87 deletions)
View changed files
📝
komorebi/src/monitor.rs(+13 -13)📝
komorebi/src/process_command.rs(+38 -4)📝
komorebi/src/process_event.rs(+2 -2)📝
komorebi/src/ring.rs(+32 -0)📝
komorebi/src/window_manager.rs(+265 -41)📝
komorebi/src/workspace.rs(+14 -27)📄 Description
This PR changes the
floating_windowsfrom aVec<Window>to aRing<Window>which allows us to keep track of the focused floating window. This combined with the existing layer switch allows us to know when we should focus the focused container or the focused floating window.The 2nd commit of this PR adds the ability to focus the floating windows depending on the direction used. It takes into account the top left corner of each window and uses that to look for the closest top left corner in the direction provided.
If there are no windows found on that direction it then checks if it can focus across monitor.
This commit is a WIP since I want some feedback on the result of the directional focus first.
The 3rd commit of this PR raises and lowers all the floating windows so that they show up with the smaller windows on top and the bigger windows on the bottom when we toggle between layers. This is mostly a cosmetic change since it looks better to have all floating windows showing up when toggling between layers, without it a bigger window could be in front of all other windows (which still happens if the bigger window is the focused one, but on any other case it looks nice, at least for me...)
I would like some feedback on these changes before cleaning up all the debug code and making it ready for merge.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.