mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[PR #1488] fix(wm): notify subscribers on floating window focus change (update the focus index of floating windows) #1425
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/1488
Author: @JustForFun88
Created: 6/17/2025
Status: 🔄 Open
Base:
master← Head:fix_floating_windows_focus📝 Commits (2)
1937405Update the focus index of floating windows1623967Fix index update on empty workspase📊 Changes
2 files changed (+16 additions, -8 deletions)
View changed files
📝
komorebi/src/process_event.rs(+1 -0)📝
komorebi/src/window_manager.rs(+15 -8)📄 Description
Issue discovered during testing #1465:
When more than two floating windows are present, switching focus between floating windows does not update the Komorebi bar status - meaning the bar keeps showing the previously focused floating window as active, instead of updating to the new focused window.
Root cause:
We did not notify subscribers about floating window focus changes, because the current focused floating window index in the workspace was not updated on focus change, so
has_been_modifieddidn’t detect a state change.The PR adds code to update the focused floating window in the current workspace before notifying subscribers. As a result, notifications about floating window focus changes are now correctly sent to all subscribers, and the Komorebi bar updates as expected.
How to reproduce (before fix):
https://github.com/user-attachments/assets/e1641b57-dd5d-44ea-8c72-1d7a60f1480d
How to test (after fix):
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.