```
Issue
Pressing Alt+Tab doesn't switch windows in about 1 in 5 cases even thought it was definitely pressed correctly.
This has been a minor annoyance of mine for a couple of months. I never really paid attention since when it happens, i simply hit alt+tab again and second time the switch happens. But eventually I realized that I started changing my window placement in favour of one window per virtual workspace instead of multiple windows on one workspace, because workspace switching shortcut always works, whereas alt+tab often fails.
Steps to reproduce
Open two xed windows in one workspace. Hit alt+tab really quickly. Sometimes the window focus switch doesn't happen even though a mouse pointer visibly blinked (changed from text input to mouse pointer and to text input again).
Why i know the alt+tab were hit correctly (together) and not one after another:
Expected behaviour
Alt+Tab should work as reliably as any other shortcut.
Other information
More thorough (harder, longer) presses of alt+tab seem to be more reliable.
I am sorry but I can't reproduce this bug.
I pressed ALT and after this i pressed TAB key (many times quickly) and everything looks good. Did you can record this issues with OBS Studio and upload on YT.
I use Linux Mint 19.2 cinnamon 4.2.4.
@pyroxar i attempted to reproduce this bug and my results matched yours.
Ok, must be just me then.
I tried to reproduce this bug on a mint live usb install medium and couldn't.
I have a many times upgraded mint, not a fresh install. Something must be rotten there.
I tried to reset all cinnamon settings which didn't help. The same bug happens, if I remap alt+tab to alt+tilde.
Triggering this bug with 'xev' window produces:
KeyPress event, serial 38, synthetic NO, window 0x5400001,
root 0x1a9, subw 0x0, time 396510008, (167,-7), root:(1028,448),
state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
FocusOut event, serial 38, synthetic NO, window 0x5400001,
mode NotifyGrab, detail NotifyAncestor
FocusIn event, serial 38, synthetic NO, window 0x5400001,
mode NotifyUngrab, detail NotifyNonlinear
KeymapNotify event, serial 38, synthetic NO, window 0x0,
keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
or sometimes
KeyPress event, serial 35, synthetic NO, window 0x5400001,
root 0x1a9, subw 0x0, time 396626372, (160,-11), root:(1021,444),
state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
FocusOut event, serial 38, synthetic NO, window 0x5400001,
mode NotifyGrab, detail NotifyAncestor
FocusIn event, serial 38, synthetic NO, window 0x5400001,
mode NotifyUngrab, detail NotifyNonlinear
KeymapNotify event, serial 38, synthetic NO, window 0x0,
keys: 110 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
I don't know what it means, but correct alt+tab without bug produces:
KeyPress event, serial 38, synthetic NO, window 0x5400001,
root 0x1a9, subw 0x0, time 396703746, (164,-15), root:(1025,440),
state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
FocusOut event, serial 38, synthetic NO, window 0x5400001,
mode NotifyGrab, detail NotifyAncestor
FocusOut event, serial 38, synthetic NO, window 0x5400001,
mode NotifyWhileGrabbed, detail NotifyNonlinear
PropertyNotify event, serial 38, synthetic NO, window 0x5400001,
atom 0x16e (_NET_WM_STATE), time 396704000, state PropertyNewValue
PropertyNotify event, serial 38, synthetic NO, window 0x5400001,
atom 0x19b (_GTK_EDGE_CONSTRAINTS), time 396704000, state PropertyNewValue
Overall it's probably not worth burning time. Since nobody but me complained I suggest you just close this bug and I reinstall my system on next occasion.
@marben thanks for following back up on this. You should able to close out the issue since you are the author.
I recently migrated from MacOS to Mint 19.2 Cinnamon. Overall I'm very happy (and I'm usually a grumpy devop), but this issue is driving me nuts. I am 99% sure it happens because the trigger for activation is keyup tab, which then checks for a modifier alt key. So what happens is if you release alt just before you release tab, then the modifier isn't there anymore and alt-tab isn't registered. For this to work properly alt-tab should be triggered on keydown tab.
It's a real issue for people who like to switch lightning fast between apps and this is how I usually work, so I'm noticing it constantly and need to force myself to hold alt before I release tab every time.
If it's not fixed then I will be very happy if it can be worked around somehow.
Edit. OK just played around with it a little more. It's probably something else, because if I hold tab it registers again, so it's not a keyup/keydown issue, but it definitely happens if you alt-tab very quickly and release tab before alt.
@Jacketbg feel free to open up a new ticket for a Feature Request. That'll help get what you are looking for noticed instead of commenting on a closed out ticket.
Most helpful comment
I recently migrated from MacOS to Mint 19.2 Cinnamon. Overall I'm very happy (and I'm usually a grumpy devop), but this issue is driving me nuts. I am 99% sure it happens because the trigger for activation is keyup
tab, which then checks for a modifieraltkey. So what happens is if you releasealtjust before you releasetab, then the modifier isn't there anymore and alt-tab isn't registered. For this to work properly alt-tab should be triggered on keydowntab.It's a real issue for people who like to switch lightning fast between apps and this is how I usually work, so I'm noticing it constantly and need to force myself to hold
altbefore I releasetabevery time.If it's not fixed then I will be very happy if it can be worked around somehow.
Edit. OK just played around with it a little more. It's probably something else, because if I hold
tabit registers again, so it's not a keyup/keydown issue, but it definitely happens if you alt-tab very quickly and releasetabbeforealt.