Maelstrom: Don't eat touch events - the game panel code might get out of sync with the touch state.

https://github.com/libsdl-org/Maelstrom/commit/1f55ec7086f41dca7c5844a047e21e9b8dc9602c

From 1f55ec7086f41dca7c5844a047e21e9b8dc9602c Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 22 Oct 2012 22:10:34 -0700
Subject: [PATCH] Don't eat touch events - the game panel code might get out of
 sync with the touch state.

---
 screenlib/UIDialog.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/screenlib/UIDialog.cpp b/screenlib/UIDialog.cpp
index 5ffffeea..e59baacb 100644
--- a/screenlib/UIDialog.cpp
+++ b/screenlib/UIDialog.cpp
@@ -66,14 +66,19 @@ UIDialog::HandleEvent(const SDL_Event &event)
 		return true;
 	}
 
-	if (event.type != SDL_QUIT && event.type != SDL_DROPFILE) {
-		/* Press escape to cancel out of dialogs */
+	// Dialogs grab keyboard and mouse events
+	if (event.type == SDL_KEYDOWN || event.type == SDL_KEYUP ||
+	    event.type == SDL_TEXTEDITING || event.type == SDL_TEXTINPUT ||
+	    event.type == SDL_MOUSEBUTTONDOWN || event.type == SDL_MOUSEBUTTONUP ||
+	    event.type == SDL_MOUSEMOTION || event.type == SDL_MOUSEWHEEL) {
+		// Press escape to cancel out of dialogs
 		if (event.type == SDL_KEYUP &&
 		    event.key.keysym.sym == SDLK_ESCAPE) {
 			GetUI()->HidePanel(this);
 		}
 		return true;
 	}
+
 	return false;
 }