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

Focused window resets to second item after some milliseconds #213

Closed
stephane-klein opened this issue Apr 4, 2020 · 7 comments
Closed
Labels
bug Something isn't working unreproducible Need help from the author to reproduce the issue

Comments

@stephane-klein
Copy link

I this issue on my alt-tab-macos instance:

https://youtu.be/nbDWCy8g2R8

When I move to the right windows, selector return always after some milliseconds to second item.

It is very boring, alt-tab-macos is unusable for me 😔

  • alt-tab-macos version: 3.4.0
  • macos version: 10.15.4

Best regards,
Stéphane

@lwouis lwouis added bug Something isn't working unreproducible Need help from the author to reproduce the issue labels Apr 6, 2020
@lwouis
Copy link
Owner

lwouis commented Apr 6, 2020

I can't reproduce the issue on my machine unfortunately, so it's hard to guess what's happening here.

It seems the focused window is reset to index 1, multiple times. In the code there are 4 places where there the index is set.

  1. This is on mouse click so unlikely to be the one at play here

    { Windows.updateFocusedWindowIndex(index) },

  2. This one happens when you invoke the UI initially, so again I don't think it's this

    Windows.updateFocusedWindowIndex(0)

  3. This one can be triggered by many things, but it is a variable step from the current selected window. In your video, which ever is the current selection is clearly resets to exactly index1, so I would say unlikely:

    updateFocusedWindowIndex(targetIndex)

This leaves us with our candidate:

  1. This one sets the index to 1, which seems exactly like what we see on screen. However, it is triggered when an app quits in the background. This means that it could be possible that on system, some background process is starting/quitting in a loop, thus affecting the focused window continuously
    Windows.updateFocusedWindowIndex(1)

@lwouis lwouis changed the title Boring UX issue: when I move to the right windows, selector return always after some milliseconds to second item Focused window resets to second item after some milliseconds Apr 6, 2020
@lwouis
Copy link
Owner

lwouis commented Apr 6, 2020

If my assumption is right and you have some process being restarted continuously, this is not a normal situation on your machine. Still, there is also a bug in AltTab to reset focus like this.

I pushed a potential fix on the more-l10n branch, which i aim to merge in a PR sometime this week, together with a bunch of other improvements. This will auto-trigger a new AltTab release that hopefully fixes the issue for you!

@stephane-klein
Copy link
Author

if my assumption is right and you have some process being restarted continuously, this is not a normal situation on your machine

Thanks, @lwouis how can I see it?

@lwouis
Copy link
Owner

lwouis commented Apr 6, 2020

I'm not sure. You could open Activity Monitor and see if you can visually find something moving in and out of the list, maybe by playing with the table sorting

@stephane-klein
Copy link
Author

You could open Activity Monitor and see if you can visually find something moving in and out of the list

@lwouis I see nothing.

For information, on my laptop, I use 👍

  • node for web development
  • docker
  • ...

@lwouis
Copy link
Owner

lwouis commented Apr 6, 2020

@stephane-klein is the problem still happening btw? What if you reboot, still happening?

If yes, could you please try this build? AltTab.app.zip Update: a new version has been release. You can simply click the update button:

image

It's a build of the branch where I made a tentative fix for the issue. I would like to know from you if it fixes it 👍

lwouis pushed a commit that referenced this issue Apr 7, 2020
# [3.6.0](v3.5.0...v3.6.0) (2020-04-07)

### Bug Fixes

* focus correct window after app quits (see [#213](#213)) ([7f27cb9](7f27cb9))
* workaround the bug in parsec (closes [#206](#206)) ([59c6afc](59c6afc))

### Features

* let users disable shortcuts ([5b03415](5b03415))
* updated localization for 7 languages ([bc2a38b](bc2a38b))
@stephane-klein
Copy link
Author

@lwouis issue fixed after upgrade to last version 3.7.3 👌

Thanks you !

@lwouis lwouis closed this as completed Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unreproducible Need help from the author to reproduce the issue
Projects
None yet
Development

No branches or pull requests

2 participants