From aebe8fabc6133898e2da817aad994c34b78a72d3 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Thu, 27 Jul 2017 12:15:52 -0230 Subject: [PATCH] Revert Alt-Enter handling from previous commit; it only seems to work reliably for Alt-Tab. --- src/emucore/EventHandler.cxx | 6 ++---- src/emucore/EventHandler.hxx | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index 315c61785..3ec2bfe56 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -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 diff --git a/src/emucore/EventHandler.hxx b/src/emucore/EventHandler.hxx index 59008f276..74dfb69f4 100644 --- a/src/emucore/EventHandler.hxx +++ b/src/emucore/EventHandler.hxx @@ -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),