Revert Alt-Enter handling from previous commit; it only seems to work reliably for Alt-Tab.

This commit is contained in:
Stephen Anthony 2017-07-27 12:15:52 -02:30
parent 4af7ba28fb
commit aebe8fabc6
2 changed files with 3 additions and 5 deletions

View File

@ -247,10 +247,10 @@ void EventHandler::handleTextEvent(char text)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void EventHandler::handleKeyEvent(StellaKey key, StellaMod mod, bool state)
{
// Swallow KBDK_TAB and KBDK_RETURN under certain conditions
// Swallow KBDK_TAB under certain conditions
// See commments on 'myAltKeyCounter' for more information
#ifdef BSPF_UNIX
if(myAltKeyCounter > 1 && (key == KBDK_TAB || key == KBDK_RETURN))
if(myAltKeyCounter > 1 && key == KBDK_TAB)
{
myAltKeyCounter = false;
return;
@ -282,8 +282,6 @@ void EventHandler::handleKeyEvent(StellaKey key, StellaMod mod, bool state)
}
else if(key == KBDK_RETURN)
{
// Swallow Alt-Enter, but remember that it happened
myAltKeyCounter = 1;
myOSystem.frameBuffer().toggleFullscreen();
}
// These only work when in emulation mode

View File

@ -587,7 +587,7 @@ class EventHandler
// window changes state, and we want to ignore that event
// For example, press Alt-Tab and then upon re-entering the window,
// the app receives 'tab'; obviously the 'tab' shouldn't be happening
// So we keep track of the cases that matter (Alt-Tab and Alt-Enter)
// So we keep track of the cases that matter (for now, Alt-Tab)
// and swallow the event afterwards
// Basically, the initial event sets the variable to 1, and upon
// returning to the app (ie, receiving EVENT_WINDOW_FOCUS_GAINED),