[PR #1496] fix(workspaces): clear stale .visible class on cross-monitor focus #9836

Open
opened 2026-05-23 03:57:43 +01:00 by JakeStanger · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JakeStanger/ironbar/pull/1496
Author: @orestisfl
Created: 5/20/2026
Status: 🔄 Open

Base: masterHead: fix/workspaces-stale-visible-on-focus


📝 Commits (1)

  • d155336 fix(workspaces): clear stale .visible class on cross-monitor focus

📊 Changes

2 files changed (+45 additions, -5 deletions)

View changed files

📝 src/modules/workspaces/button.rs (+21 -2)
📝 src/modules/workspaces/mod.rs (+24 -3)

📄 Description

Compositors only emit a Focus event for the (old, new) workspace pair, so a third workspace which was visible on the newly-focused output would keep its .visible CSS class indefinitely.

No known issue.

See video with before/after:
https://github.com/user-attachments/assets/f5aa39df-9422-401a-a119-f930ffddc98d

My ironbar style.css differentiates button colors between visible, focused and hidden. You can see the colors change as I focus the other monitor (not visible in recording).

Before: As I switch to the second monitor, the buttons of the first switch to the visible state color. However, when I switch back to the main monitor to a different workspace, they never lose their "visible" status.
After: Switching to a different workspace in the first monitor updates the other buttons.


🔄 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/JakeStanger/ironbar/pull/1496 **Author:** [@orestisfl](https://github.com/orestisfl) **Created:** 5/20/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `fix/workspaces-stale-visible-on-focus` --- ### 📝 Commits (1) - [`d155336`](https://github.com/JakeStanger/ironbar/commit/d1553363fa81586a835da0e40193717f25560e92) fix(workspaces): clear stale `.visible` class on cross-monitor focus ### 📊 Changes **2 files changed** (+45 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/modules/workspaces/button.rs` (+21 -2) 📝 `src/modules/workspaces/mod.rs` (+24 -3) </details> ### 📄 Description Compositors only emit a `Focus` event for the (old, new) workspace pair, so a third workspace which was visible on the newly-focused output would keep its `.visible` CSS class indefinitely. No known issue. See video with before/after: https://github.com/user-attachments/assets/f5aa39df-9422-401a-a119-f930ffddc98d My ironbar style.css differentiates button colors between visible, focused and hidden. You can see the colors change as I focus the other monitor (not visible in recording). Before: As I switch to the second monitor, the buttons of the first switch to the visible state color. However, when I switch back to the main monitor to a different workspace, they never lose their "visible" status. After: Switching to a different workspace in the first monitor updates the other buttons. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#9836
No description provided.