mirror of https://github.com/stella-emu/stella.git
Revert Alt-Enter handling from previous commit; it only seems to work reliably for Alt-Tab.
This commit is contained in:
parent
4af7ba28fb
commit
aebe8fabc6
|
@ -247,10 +247,10 @@ void EventHandler::handleTextEvent(char text)
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void EventHandler::handleKeyEvent(StellaKey key, StellaMod mod, bool state)
|
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
|
// See commments on 'myAltKeyCounter' for more information
|
||||||
#ifdef BSPF_UNIX
|
#ifdef BSPF_UNIX
|
||||||
if(myAltKeyCounter > 1 && (key == KBDK_TAB || key == KBDK_RETURN))
|
if(myAltKeyCounter > 1 && key == KBDK_TAB)
|
||||||
{
|
{
|
||||||
myAltKeyCounter = false;
|
myAltKeyCounter = false;
|
||||||
return;
|
return;
|
||||||
|
@ -282,8 +282,6 @@ void EventHandler::handleKeyEvent(StellaKey key, StellaMod mod, bool state)
|
||||||
}
|
}
|
||||||
else if(key == KBDK_RETURN)
|
else if(key == KBDK_RETURN)
|
||||||
{
|
{
|
||||||
// Swallow Alt-Enter, but remember that it happened
|
|
||||||
myAltKeyCounter = 1;
|
|
||||||
myOSystem.frameBuffer().toggleFullscreen();
|
myOSystem.frameBuffer().toggleFullscreen();
|
||||||
}
|
}
|
||||||
// These only work when in emulation mode
|
// These only work when in emulation mode
|
||||||
|
|
|
@ -587,7 +587,7 @@ class EventHandler
|
||||||
// window changes state, and we want to ignore that event
|
// window changes state, and we want to ignore that event
|
||||||
// For example, press Alt-Tab and then upon re-entering the window,
|
// For example, press Alt-Tab and then upon re-entering the window,
|
||||||
// the app receives 'tab'; obviously the 'tab' shouldn't be happening
|
// 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
|
// and swallow the event afterwards
|
||||||
// Basically, the initial event sets the variable to 1, and upon
|
// Basically, the initial event sets the variable to 1, and upon
|
||||||
// returning to the app (ie, receiving EVENT_WINDOW_FOCUS_GAINED),
|
// returning to the app (ie, receiving EVENT_WINDOW_FOCUS_GAINED),
|
||||||
|
|
Loading…
Reference in New Issue