i3wsr: Mouse hover on i3bar causes automatic workspace switching to first workspace

Description:

when i3wsr is running, if you hover mouse over i3bar (any window with type of _NET_WM_WINDOW_TYPE_DOCK) under certain situations it changes the workspace to the first one. It happens when the currently focused workspace is renamed. personally I experienced it with dual monitor setup but I’ve heard it’s also happens with a single monitor(needs verification) I also replicated this issue with python i3ipc and it had the same behavior as i3wsr. So I think the problem might not be from i3wsr itself but given that dynamically renaming workspaces is not an i3 feature, I thought I should discuss this issue here first.

steps to reproduce:

  • step 1: On the top monitor workspaces 1 and 2 are open. workspace 2 is focused On the bottom monitor workspaces 7 and 8 are open. workspace 8 is focused image
  • step 2: open new window in workspace 8 that changes its name. image
  • step 3: move mouse from bottom monitor to top and bottom again. workspace switchs to 7 image

clip showing the same procedure: issue.webm

further information:

While investigating the source of the bug, I found some workarounds to reduce the occurrence of this issue. normally you would traverse the workspace tree and renamed all the workspaces. To make it happen less often, I changed it so that it only renamed the effected workspaces. for title new events, it is possible to get the workspace name and only rename that workspace. for move and close, I had to check if the names changed and only rename those workspaces. which again made the bug trigger way less.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Hi @Ali-Flt, I’ve tried, I refactored the whole app to try to get to the bottom of it, but I simply couldn’t find a solution that worked. I’m not sure if its an i3 API issue or not, but IIRC i was able to reproduce the issue using i3-ipc. That doesn’t necessarily mean anything, could still be an issue with i3wsr.

I was able to narrow it down a bit though, maybe I’ll have a look again later, see if I can get any further

Hi @MkSafavi, thanks a ton for the detailed issue! Appreciate all the details and the reproduction steps. I’ll have a look this weekend.