[PR #1488] fix(wm): notify subscribers on floating window focus change (update the focus index of floating windows) #1425

Open
opened 2026-01-05 14:55:14 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/LGUG2Z/komorebi/pull/1488
Author: @JustForFun88
Created: 6/17/2025
Status: 🔄 Open

Base: masterHead: fix_floating_windows_focus


📝 Commits (2)

  • 1937405 Update the focus index of floating windows
  • 1623967 Fix 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_modified didn’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):

  • Open 2+ floating windows.
  • Switch focus between them.
  • Notice that the Komorebi bar does not reflect the focus change.

https://github.com/user-attachments/assets/e1641b57-dd5d-44ea-8c72-1d7a60f1480d

How to test (after fix):

  • Repeat the steps above: the Komorebi bar now updates when focus changes between floating windows.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/LGUG2Z/komorebi/pull/1488 **Author:** [@JustForFun88](https://github.com/JustForFun88) **Created:** 6/17/2025 **Status:** 🔄 Open **Base:** `master` ← **Head:** `fix_floating_windows_focus` --- ### 📝 Commits (2) - [`1937405`](https://github.com/LGUG2Z/komorebi/commit/1937405f1cc205ac71ca3aa8468b9c7f4dc44cde) Update the focus index of floating windows - [`1623967`](https://github.com/LGUG2Z/komorebi/commit/162396747acd6481e84fb1125bf3aecc89695ea2) Fix index update on empty workspase ### 📊 Changes **2 files changed** (+16 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `komorebi/src/process_event.rs` (+1 -0) 📝 `komorebi/src/window_manager.rs` (+15 -8) </details> ### 📄 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_modified` didn’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): - Open 2+ floating windows. - Switch focus between them. - Notice that the Komorebi bar does not reflect the focus change. https://github.com/user-attachments/assets/e1641b57-dd5d-44ea-8c72-1d7a60f1480d ## How to test (after fix): - Repeat the steps above: the Komorebi bar now updates when focus changes between floating windows. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-01-05 14:55:14 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#1425