mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-24 17:48:34 +02:00
feat(borders): add border manager module
This commit removes all border-related code from process_command, process_event etc. and centralizes it in the new border_manager module. Instead of trying to figure out where in process_event and process_command we should make border-related changes, a notification gets sent to a channel that border_manager listens to whenever an event or command has finished processing. The border_manager listener, upon receiving a notification, acquires a lock on the WindowManager instance and updates borders for the focused workspace on every monitor; this allows us to centralize all edge case handling within the border_manager listener's loop. Borders on workspaces that lose focus are now destroyed and recreated when those workspaces regain focus, instead of trying to share individual border instances across workspaces. A number of common edge cases that have been addressed in this commit are: * Paused window manager * Floating workspaces * Maximized windows * Fullscreen videos * Monocle containers * Ghost borders on workspace switching * Incorrect focused window border colours Global state related to borders has also been moved into the border_manager module, which also tracks the state of border objects (BORDER_STATE), their rects (RECT_STATE) and their focus kinds (FOCUS_STATE). This allows us to now track multiple borders per-container, enabling unfocused border windows for the first time. Additionally, the Z-Order for border windows is now also configurable. ActiveWindowBorderColours has been expanded to include Unfocused, but in order to not introduce a breaking configuration change for end users, all members of this struct have been made Option<Colour>.
This commit is contained in:
@@ -18,6 +18,8 @@ dirs = "5"
|
||||
color-eyre = "0.6"
|
||||
serde_json = { package = "serde_json_lenient", version = "0.1" }
|
||||
sysinfo = "0.30"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
uds_windows = "1"
|
||||
|
||||
[workspace.dependencies.windows]
|
||||
version = "0.54"
|
||||
|
||||
Reference in New Issue
Block a user