[PR #1077] [MERGED] fix(wm): focus window on Show when there is only 1 window #1192

Closed
opened 2026-01-05 14:54:25 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/LGUG2Z/komorebi/pull/1077
Author: @alex-ds13
Created: 10/21/2024
Status: Merged
Merged: 10/29/2024
Merged by: @LGUG2Z

Base: masterHead: fix/focus-window-on-show


📝 Commits (1)

  • 76af1cf fix(wm): focus window on Show when there is only 1 window

📊 Changes

1 file changed (+15 additions, -0 deletions)

View changed files

📝 komorebi/src/process_event.rs (+15 -0)

📄 Description

This commit makes sure we refocus the window on Show event when it is the only window on the workspace. This is needed because some windows some times send the FocusChange event before the Show event and on the first event we will be focusing the desktop window to unfocus any previous window from other workspace because the workspace will still be empty. So after adding the window we need to focus it again.

This fixes an issue brought up on discord by @amnweb here


🔄 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/1077 **Author:** [@alex-ds13](https://github.com/alex-ds13) **Created:** 10/21/2024 **Status:** ✅ Merged **Merged:** 10/29/2024 **Merged by:** [@LGUG2Z](https://github.com/LGUG2Z) **Base:** `master` ← **Head:** `fix/focus-window-on-show` --- ### 📝 Commits (1) - [`76af1cf`](https://github.com/LGUG2Z/komorebi/commit/76af1cff08b5a83a12a08473e7221d81458d7b40) fix(wm): focus window on `Show` when there is only 1 window ### 📊 Changes **1 file changed** (+15 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `komorebi/src/process_event.rs` (+15 -0) </details> ### 📄 Description This commit makes sure we refocus the window on `Show` event when it is the only window on the workspace. This is needed because some windows some times send the `FocusChange` event before the `Show` event and on the first event we will be focusing the desktop window to unfocus any previous window from other workspace because the workspace will still be empty. So after adding the window we need to focus it again. This fixes an issue brought up on discord by @amnweb [here](https://discord.com/channels/898554690126630914/898556726108901386/1294848652451516436) --- <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:54:25 +01:00
adam closed this issue 2026-01-05 14:54:25 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#1192