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
- step 2:
open new window in workspace 8 that changes its name.
- step 3:
move mouse from bottom monitor to top and bottom again. workspace switchs to 7
clip showing the same procedure:
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
- fix: focus on old before renaming Fixes issue with multi-monitor dragging would cause the workspace to switch unexpectedly, possible fix for #34, but the reported issue is a bit different than what I... — committed to roosta/i3wsr by roosta 2 years ago
- fix: focus old on workspace focus events Same fix as in 299fc77, but only on focus events, seems to resolve the issue, without disrupting other functionality ref: https://github.com/roosta/i3wsr/iss... — committed to roosta/i3wsr by roosta 2 years ago
- feat: sway support - Add sway support, see changelog.md for details on how to migrate - add --verbose logging flag - Fix #34 - Deprecate --icons option Squashed commit of the following: commit 32f0... — committed to roosta/i3wsr by roosta 2 years ago
- fix: move focus fix under a feature flag Causing unwanted workspace focus dispatches on every rename, see #34 #42 for more. This way I can keep working on a possible fix without possibly disrupting... — committed to roosta/i3wsr by roosta 2 years ago
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.