Maelstrom: Don't dispatch events to hidden elements. :)

https://github.com/libsdl-org/Maelstrom/commit/4bf16ac8bcf1603cc846ce03f77101649798ab3c

From 4bf16ac8bcf1603cc846ce03f77101649798ab3c Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sun, 6 Nov 2011 01:08:48 -0400
Subject: [PATCH] Don't dispatch events to hidden elements. :)

---
 screenlib/UIBaseElement.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/screenlib/UIBaseElement.cpp b/screenlib/UIBaseElement.cpp
index 889cd435..d3f51159 100644
--- a/screenlib/UIBaseElement.cpp
+++ b/screenlib/UIBaseElement.cpp
@@ -184,6 +184,9 @@ bool
 UIBaseElement::HandleEvent(const SDL_Event &event)
 {
 	for (int i = m_elements.length(); i--; ) {
+		if (!m_elements[i]->IsShown()) {
+			continue;
+		}
 		if (m_elements[i]->IsDisabled()) {
 			continue;
 		}