Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse hover on i3bar causes automatic workspace switching to first workspace #34

Open
mksafavi opened this issue Sep 27, 2023 · 13 comments

Comments

@mksafavi
Copy link
Contributor

mksafavi commented Sep 27, 2023

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.

@roosta
Copy link
Owner

roosta commented Sep 28, 2023

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

@roosta
Copy link
Owner

roosta commented Oct 2, 2023

Ok I've had a look and I'm unable to reproduce.
Just so we've eliminated one thing, could you try the develop branch and see if the problem persists?

@mksafavi
Copy link
Contributor Author

mksafavi commented Oct 5, 2023

I'll try the develop branch on the weekend.
I tried the release version again. I can only reproduce it consistently with wm_property = "name".
With wm_property = "class" It happens once after starting i3wsr. And after that It was kinda random I couldn't identify how exactly it happened.

Did you try it with two monitors? I tried it with a single monitor and I couldn't reproduce it with either. I feel like it's a niche dual monitor problem that would be really hard to find.

Thanks again 👍

@roosta
Copy link
Owner

roosta commented Oct 18, 2023

Yes I did try with multiple monitors, and was unable to reproduce. Did you get a chance to try the dev branch?

@mksafavi
Copy link
Contributor Author

mksafavi commented Oct 18, 2023

Hi.
I just built the develop branch. and it happens as well.
It also happens when moving floating windows between monitors with mouse (holding meta key and dragging window between monitors)
Could it be from my I3 setup? I'm running the arch repo build. Maybe I can try with a clean config to see if happens.

@roosta
Copy link
Owner

roosta commented Oct 18, 2023

hmm, yeah give a clean config a try.
EDIT: removed a question that has been answered already

@roosta
Copy link
Owner

roosta commented Nov 1, 2023

Hi again, did you ever get a chance to try a clean config? I suspect the issue might be with the i3 option focus_follows_mouse, but even with that on, I don't see the behavior you're reporting.

@roosta
Copy link
Owner

roosta commented Nov 7, 2023

Just letting you know I was able to reproduce some odd behavior when moving windows between monitors, looking into it.

@mksafavi
Copy link
Contributor Author

mksafavi commented Nov 7, 2023

Hi

Hi again, did you ever get a chance to try a clean config? I suspect the issue might be with the i3 option focus_follows_mouse, but even with that on, I don't see the behavior you're reporting.

Turning focus_follows_mouse off didn't change the behavior on my machine.
I did try with a clean i3 config file. the issue was the same. I didn't get a chance to try with a new install yet.

Just letting you know I was able to reproduce some odd behavior when moving windows between monitors, looking into it.

good to hear that. 👍

@elmodor
Copy link

elmodor commented Nov 10, 2023

I have the same/similar issue with 2 monitors. Randomly when moving or closing any window the active workspace can change.

@Ali-Flt
Copy link

Ali-Flt commented Feb 19, 2024

@roosta any updates on this? do you think this may be an issue with i3's API?

@roosta
Copy link
Owner

roosta commented Feb 19, 2024

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

@Ali-Flt
Copy link

Ali-Flt commented Feb 19, 2024

@roosta thanks for the update. I created an issue in i3's repo about this as well: i3/i3#5924

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants