Alt-tab in Linux generates another 'tab'

In my application (Stella, 2600 emulator: stella-emu.github.io),
pressing Alt-Tab to switch to another window works fine, but when
switching back, sometime the app receives a ‘tab’ key event. Since I
use the tab key to navigate the in-game UI, it basically means every
time I alt-tab back, the active widget is changed.

The same code runs in OSX and Windows without issue; Alt-tabbing out and
back into the app doesn’t generate this extraneous tab. Note that this
is also happening for Alt-Enter, under similar circumstances.

I’ve tested several Linux desktop environments, and OSX Sierra and
Windows 10. It only happens in Linux. I’ve also tested on different
computers and keyboards, to rule that out. All are using SDL 2.0.5.

For now, I have code that works around it, by basically detecting when
the window loses and gains focus, but to me it seems a bit hacky to have
to do this.

Any advice on what this could be?

Thanks,
Steve A.
Stella maintainer

I’m pretty sure we have an open bug about this right now. I’ll check on it.

This sounds like the one?
https://bugzilla.libsdl.org/show_bug.cgi?id=3280

1 Like

Yes, that’s the one.