aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UMain.pas
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UMain.pas11
1 files changed, 9 insertions, 2 deletions
diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas
index feaaedf1..19607404 100644
--- a/Game/Code/Classes/UMain.pas
+++ b/Game/Code/Classes/UMain.pas
@@ -161,11 +161,18 @@ Begin
Begin
// beep;
Case Event.type_ Of
- SDL_QUITEV: begin
+ SDL_ACTIVEEVENT: //workaround for alt-tab bug
+ begin
+ if (Event.active.gain=0) then
+ SDL_SetModState(0);
+ end;
+
+ SDL_QUITEV:
+ begin
Display.Fade := 0;
Display.NextScreenWithCheck := nil;
Display.CheckOK := True;
- end;
+ end;
{ SDL_MOUSEBUTTONDOWN:
With Event.button Do
Begin