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

After opening AltTab, it seems like the Next Window shortcut is pressed a few times without the user doing anything #3117

Open
SamadiPour opened this issue Jan 19, 2024 · 84 comments
Labels
bug Something isn't working unreproducible Need help from the author to reproduce the issue

Comments

@SamadiPour
Copy link

Describe the bug

Since a few weeks ago, I have been experiencing drifting when the mouse is hovered over an item. It only happens when the mouse is over an item, and not when it's inside or outside of the frame.
When I hold down the Command key and press Tab once (push and release instantly), the selector drifts through the items, sometimes until it reaches the mouse and sometimes until it reaches the end.
The Mouse hover option under Also select windows using is disabled.

Screenshots / video

Screenshot.2024-01-19-jK5O4SMZ1.mp4

Steps to reproduce the bug

Your environment

  • AltTab version: 6.64.0
  • macOS version: 14.2.1
@SamadiPour SamadiPour added the bug Something isn't working label Jan 19, 2024
@warrenseine
Copy link

I experience the same issue with the same environment. I reverted to 6.63.0 and the weird behavior is gone.

I suspect this is related to this commit.

@lwouis
Copy link
Owner

lwouis commented Jan 19, 2024

Thank you @warrenseine for sharing this message.

@SamadiPour does v6.63.0 also fix the issue for you?

I don't see how the issue would be related to the commit though.

@SamadiPour on your video, I see some flickering on the right part of AltTab's window. I'm wondering if you are not suffering from #1840. Could you please show the top menubar of your screen, when the issue happens? If there are 2 AltTab icons, that's the source of the issue right there.

@lwouis lwouis added the unreproducible Need help from the author to reproduce the issue label Jan 19, 2024
@SamadiPour
Copy link
Author

@lwouis Just tried v6.63.0, and it seems like I can't see the issue anymore. I will test more to make sure.

Also, flickering might be because of video compression or the recorder. I didn't see any flicker while using it. I also checked the processes and top menubar, and there was only one instance running.

@SamadiPour
Copy link
Author

Update: I have not experienced the issue since downgrading to v6.63.0.

@ankushagarwal
Copy link

I can confirm that this happens to me as well. I am on the app version 6.64.0. I am on the latest macOS Sonoma version 14.2.1

https://www.loom.com/share/76a2006f084b4b52880ec7a25879958e

@ythosa
Copy link

ythosa commented Jan 26, 2024

the same problem

@esserrge
Copy link

esserrge commented Jan 26, 2024

I had this problem on Sonoma 14.2, it does not seem to happen after upgrade to 14.3. Running alttab 6.64.0 on both versions.

@agmitron
Copy link

The same here

@Warkanlock
Copy link

Same here; it's getting annoying, but I don't want to just throw the issue to maintainers. I'll be happy to contribute if any core maintainer could give me to the issue!

@lwouis
Copy link
Owner

lwouis commented Feb 1, 2024

@ankushagarwal from your video, I wonder if this issue is related in any way to the mouse. Can you reproduce the issue without moving the mouse at all, with the mouse outside the AltTab UI?

Same question for @SamadiPour: can you reproduce the issue without having the mouse hover AltTab?

It looks to me like it could be about key repeats, and maybe external keyboards or software keyboard remappers.

@warrenseine
Copy link

warrenseine commented Feb 1, 2024

I do use BetterTouchTool, but only to bind shortcuts.

I use the trackpad and generally don't touch it while alt-tabbing. But it's possible that the cursor is on top of one of the window tile when I alt-tab. I'll monitor.

Also, I'd like to re-iterate that it's very much likely a regression in 6.64. I reverted to 6.63 and didn't have the issue for a week, then I accidently auto-updated back to 0.64 and the bug started again. I re-installed 6.63 once more.

@lwouis
Copy link
Owner

lwouis commented Feb 1, 2024

I'm suspecting that it is not a regression introduced in v6.64. I suspect it because the only code change that could potentially impact is 3b0194d, and I can't imagine how it would interact with the use-case here. I may be missing it, but I could also be guessing right, in which case the issue is not about AltTab, but about something with your environments.

Many people have thought AltTab was bugged, and later realized that the root cause was their external keyboard, software remapper, rare keyboard layout, key repeat settings, etc.

In the case that the issue would be a regression from AltTab, it would be important to establish if indeed the mouse position or movement is involved, or if it's purely a keyboard event issue. The code change only deals with keyboard events, which is why I'm suspecting that the mouse may not have anything to do with the behaviors we see on the various videos.

@np25071984
Copy link

I experience the same.

Noticed strange thing about the app switcher window - when there are two apps (Slack and Mictosoft Teams in my case) and the mouse cursor is somewhere around the switcher area, after I pressed app switch combination the switcher window remains on the screen. Having hard time reproducing it yet but it is definitely the thing. Have caught it many times so far. I believe it is relevant to the topic.

@micpiatek
Copy link

micpiatek commented Feb 13, 2024

Can confirm that I was experiencing the same issue on 6.65.0 and reverting back to 6.63.0 fixed it. Whenever I would move my mouse when using AltTab, the selection window would spaz out and be completely unusable until after restarting the app.

Similar issue that was closed here #3168

@harshmandan
Copy link

harshmandan commented Feb 15, 2024

Same problem here.

I couldn't switch windows using alt+tab whenever the mouse was over the switcher UI, even if I did not move the pointer, the switching would glitch out and wouldn't work.

To make it work I have to move the cursor away from the center (to be specific, outside the switcher overlay) and then alt-tab would work fine.

Reverted to v6.63.0, it's working fine now.

@RecuencoJones
Copy link

I've been trying 6.63.0 for a couple days and thought it was fixed but apparently it technically isn't, I still get the option drifting but way less often than with latest version.

@warrenseine
Copy link

Yes, same here. I've reported that it was ok in 6.63.0, but after a few days / weeks, I've noticed the behaviour too.

@lwouis
Copy link
Owner

lwouis commented Feb 15, 2024

It looks like my hypothesis was right then.

The issue is either with some external factor like third-party hardware or software, or it's an AltTab issue with has been here for a while, before v6.63.0.

@harshmandan
Copy link

harshmandan commented Feb 16, 2024

I degraded to 6.63.0 after running into this problem and I posted about it here.

I also wanted to share the video of what I was seeing. So I recorded my screen with the degraded version 6.63.0 working normally, then I installed 6.65.0 but I could not reproduce the behavior I was facing before. It's super weird. It has been only a day and If it returns I'll record and add a video here.

Regarding external factors, I use BetterTouchTool (to map gesture on trackpad to open a link in a new tab) and I do use an external bluetooth keyboard.

So maybe it could be related to something external, 🤷‍♂️.

This was referenced Feb 16, 2024
@lwouis
Copy link
Owner

lwouis commented Feb 16, 2024

Can anyone reproduce the issue without having the mouse hover the UI? I would like to understand if the issue is related to the mouse hovering the UI, or not.

@broegaard
Copy link

I have also experienced something similar to this problem randomly through months (maybe years), but not with 6.65.0.

I have a gut feeling that it might have something to do with cpu load, but I cannot reproduce it.

@jsh9
Copy link

jsh9 commented May 1, 2024

Now whenever this issue occurs, I just uninstalled and reinstalled the app (of the same version). The issue would go away for a few days (sometimes up to a week or so), and then reoccur.

@ikfid
Copy link

ikfid commented May 3, 2024

oh, I see I am not alone.... 6.68.0, Sonoma 14.4.1, M2 Pro.
When the mouse cursor is in the middle of the screen, pressing command+tab just once results in advancing the window switcher through several icons after a delay of 1 second or so, such that you cannot navigate to the right window until this unwanted advancing is done.
when the mouse cursor is in the screen corner, this behavior is not observed.

@cupcakearmy
Copy link
Sponsor

cupcakearmy commented May 3, 2024

It seems I'm having the same issue.

Findings

  • When the mouse is not in the "switcher" area, everything is perfect and snappy
  • When the mouse is in the "switcher" area
    • The menu is slower to open
    • Sometimes the selection jumps to the last window (without me pressing any additional key)

Basically the same as @ikfid

Demo.mp4

Is there any way to simply disable mouse in the settings?

Versions
Alt-Tab: Version 6.68.0
macOS: 14.4.1 (23E224)

@vsisl
Copy link

vsisl commented May 8, 2024

Hi there,

I have the exact same experience as @cupcakearmy :

When the mouse is not in the "switcher" area, everything is perfect and snappy
When the mouse is in the "switcher" area:

  • The menu is slower to open
  • Sometimes the selection jumps to the last window (without me pressing any additional key)

Versions
Alt-Tab: Version 6.67.0
macOS: 14.4.1 (intel)

The bug has been occurring for a while already. (I remember I updated both the OS and AltTab in the meantime.)

Second best would be that someone here who can reproduce it often work with me to debug it, in a screen-sharing type of session.

@lwouis I can help with that.

@shresth45
Copy link

It seems I'm having the same issue.

Findings

  • When the mouse is not in the "switcher" area, everything is perfect and snappy

  • When the mouse is in the "switcher" area

    • The menu is slower to open
    • Sometimes the selection jumps to the last window (without me pressing any additional key)

Basically the same as @ikfid

Demo.mp4
Is there any way to simply disable mouse in the settings?

Versions Alt-Tab: Version 6.68.0 macOS: 14.4.1 (23E224)

I was going crazy worried that there was something wrong with my mac hardware. But kudos to the efforts in this thread, these steps mentioned are very reproducible

@jim-alexander
Copy link

I've stopped using alttab because of this. Tried previous versions mentioned here and still the issue persists.

_I think when the mouse is over the window it happens more often if that helps 🤷 _

@samuelhwilliams
Copy link

samuelhwilliams commented May 17, 2024

I get this constantly. It's infuriating and I'm close to giving up on alt+tab as well because it makes it so unusable.

Having seen the comments in this thread and actively moving my mouse to the edge of the screen before alt+tab, it does seem to not happen when the mouse is off the alt+tab popup. Which is maybe a workaround for now..

Edit: this isn't a reliable workaround - I still get the issue. I do have a multi monitor setup like the person below.

Alt-Tab Version 6.68.0
MacOS 14.4.1 (23E224), ARM

@broegaard
Copy link

broegaard commented May 24, 2024

For a long time I did not have the issue, but now with sonoma 14.5 (23F79), the issue have re-emerged.

I think it is related two my multi monitor setup: If I open four windows of firefox and place two on each screen. The problem occur each time I switch to a window on the other screen (each time alttab moves to the other screen).

But if I go to Alttab->Preferences->Appearance->Show on and change the value from "Active screen" to "Screen including the menu bar" the problem seems to be solved.

Edit:
The problem did re-occur now, so my fix did not solve the problem

@EskelCz
Copy link

EskelCz commented Jun 1, 2024

Same thing, the issue returned. I feel like it bugs out when alt-tabbing quickly again when the previous alt-tab is closing.

@nyanpasu64
Copy link

nyanpasu64 commented Jun 1, 2024

I think the right approach to this bug is to instrument the source code to log all input events/handlers, then compare the logs with the mouse cursor over the alt-tab switcher or not. In fact I even tried to do this, but when I tried to build the project from source in Xcode I got an error Command CopyPNGFile failed with a nonzero exit code and don't know how to fix it.

@kcho17
Copy link

kcho17 commented Jun 10, 2024

I've noticed the same issue as well. I think the issue has started since I updated macOS and Alt-tab, but I am not sure about it.

@problame
Copy link

I've been running this build for multiple months on Sonoma and the problems pointed out in the top post of this issue have been fully mitigated by it.

Can we move forward and apply the fix from that build to the main tree?

@lwouis
Copy link
Owner

lwouis commented Jun 15, 2024

@problame #3117 (comment)

@jebeaudet
Copy link

For me, it seems like the issue is around repeating keys as I don't see any changes whether my mouse is in the alttab window or not.

I have these repeating key settings :
image

For me, sometimes when I press cmd + tab and release really quickly tab while holding cmd, it sometimes act as if I was holding tab and the switcher goes automatically to the last option in the alttab window. I'm guessing it's related to the repeating key kicking in macos.

I just installed the custom build and one difference I see is that if I'm deliberately holding tab after pressing cmd+tab, it does not do anything, the selected window stays on the second in the list.

@letalumil
Copy link
Sponsor

letalumil commented Jun 24, 2024

I have been experiencing this problem for a few weeks now.
What I've noticed is that the problem only happens when the mouse cursor is in the AltTab modal.
When the cursor is outside the AltTab modal, everything works fine.

Please have a look at the attached video. In the video I press and release Cmd+Tab repeatedly. In the first part of the video, when the cursor is outside the AltTab modal, everything works fine. But when the cursor is over it, the modal doesn't disappear or the window selection starts to drift as if I had pressed Tab a few more times.

AltTab Version 6.70.1
macOS Version 14.5 (23F79), Apple M2 Max

Screen.Recording.2024-06-24.at.11.38.42.mov

@lwouis
Copy link
Owner

lwouis commented Jun 24, 2024

@letalumil Could you please try #3117 (comment), and see if it has this issue or not?

@letalumil
Copy link
Sponsor

@letalumil Could you please try #3117 (comment), and see if it has this issue or not?

Thank you for your quick reply. I've tried the build you provided and the issue doesn't reproduce there, but the fun fact is that when I switched back to 6.70.1 after testing the build, the issue doesn't reproduce there either. Looks like restarting AltTab fixes the behaviour for me. I'll keep testing both builds and try to find the cause of the behaviour and update you as soon as I find something.

@DavidAllewell
Copy link

@lwouis I've been using the build from #3117 (comment) for a few weeks now, and while the issue with repeated keys does seem to be fixed, I've noted strange behaviour regarding mouse positioning that @letalumil highlighted.

The issue only occurs when the cursor is in a location that would result in it hovering over a window (so in the event you have an incomplete row of windows, the empty space under the previous row is a safe space for the cursor).

It presents itself as quite a large lag between hitting Ctrl+Tab, and the window appearing. I'm even able to have the AltTab window remain open after releasing Ctrl+Tab, if my timing is correct.

I think it might boil down to some strange behaviour with mouse hovering on the windows? Sorry if this isn't overly useful.

@efaulhaber
Copy link

I downgraded to v6.63.0 after first experiencing this problem and finding this issue. I still noticed the problem appearing like once or twice a day (as opposed to the new versions where it happened all the time). Now I've been using the build from #3117 (comment) for a few days and I haven't experienced the problem at all.

@markkkkas
Copy link

Hey if someone still observes this one, can you try disable all checkboxes from this setting #3466 (comment)? In my case personally it helped.

@samuelhwilliams
Copy link

That worked for me for a while (yesterday) but today I've got the same issue (as well as the AltTab popup being generally laggy/unresponsive).

@NayamAmarshe
Copy link

Hey if someone still observes this one, can you try disable all checkboxes from this setting #3466 (comment)? In my case personally it helped.

That worked for me for 2 days

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