[GH-ISSUE #1408] Workspaces module doesn't update focused workspace after window changes montior in Sway #1830

Open
opened 2026-05-22 22:54:51 +01:00 by JakeStanger · 0 comments
Owner

Originally created by @ikoas on GitHub (Mar 1, 2026).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1408

Describe the bug

In a multi monitor setup using Sway, changing a window from a one monitor to another using bindsym $mod+Shift+Left move left, or other directions, keeps focus on that window, so when we have monitor A with workspace 1 and monitor B with workspace 2 and we move a window from A to B the focus is kept on the window so then the focus moved from workspace 1 to 2. The problem is that when doing this the Workspaces module shows focus is still on workspace 1.

To reproduce
Steps to reproduce the behavior:

  1. Add module workspaces
  2. Open a window
  3. Move window to another monitor using bindsym $mod+Shift+Left move left
  4. Observe that workspace module shows focus is not on the workspace where focus is currently

Expected behavior

After moving a window to another monitor using bindsym $mod+Shift+Left move left, the workspace module should show that focus is on the workspace where the window was moved.

System information:

  • Distro: Arch Linux
  • Compositor: Sway
  • Ironbar version: 0.18.0-2

Additional context

Using any of the following Sway keybinds results in this behavior:

bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

But using these ones don't. My guess is that this is because these don't maintain the focus on the window after moving it:

bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10

Maybe this isn't related but I noticed that moving the window using bindsym $mod+Shift+Left move left only moves the window but keeps the mouse in place, so if you move a window from A to B, the mouse stays on A.

Screenshots

Image
Originally created by @ikoas on GitHub (Mar 1, 2026). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1408 **Describe the bug** <!-- A clear and concise description of what the bug is. --> In a multi monitor setup using Sway, changing a window from a one monitor to another using `bindsym $mod+Shift+Left move left`, or other directions, keeps focus on that window, so when we have monitor A with workspace 1 and monitor B with workspace 2 and we move a window from A to B the focus is kept on the window so then the focus moved from workspace 1 to 2. The problem is that when doing this the Workspaces module shows focus is still on workspace 1. **To reproduce** Steps to reproduce the behavior: 1. Add module `workspaces` 2. Open a window 3. Move window to another monitor using `bindsym $mod+Shift+Left move left` 4. Observe that workspace module shows focus is not on the workspace where focus is currently **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> After moving a window to another monitor using `bindsym $mod+Shift+Left move left`, the workspace module should show that focus is on the workspace where the window was moved. **System information:** - Distro: Arch Linux - Compositor: Sway - Ironbar version: 0.18.0-2 **Additional context** <!-- Add any other context about the problem here. --> Using any of the following Sway keybinds results in this behavior: ``` bindsym $mod+Shift+Left move left bindsym $mod+Shift+Down move down bindsym $mod+Shift+Up move up bindsym $mod+Shift+Right move right ``` But using these ones don't. My guess is that this is because these don't maintain the focus on the window after moving it: ``` bindsym $mod+Shift+1 move container to workspace number 1 bindsym $mod+Shift+2 move container to workspace number 2 bindsym $mod+Shift+3 move container to workspace number 3 bindsym $mod+Shift+4 move container to workspace number 4 bindsym $mod+Shift+5 move container to workspace number 5 bindsym $mod+Shift+6 move container to workspace number 6 bindsym $mod+Shift+7 move container to workspace number 7 bindsym $mod+Shift+8 move container to workspace number 8 bindsym $mod+Shift+9 move container to workspace number 9 bindsym $mod+Shift+0 move container to workspace number 10 ``` Maybe this isn't related but I noticed that moving the window using `bindsym $mod+Shift+Left move left` only moves the window but keeps the mouse in place, so if you move a window from A to B, the mouse stays on A. **Screenshots** <!-- If applicable, add screenshots to help explain your problem. --> <img width="3926" height="1440" alt="Image" src="https://github.com/user-attachments/assets/035a4d34-9c01-4a1c-bb77-36143d3cfb48" />
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#1830
No description provided.