From e1ae86f643c5ca1b6cd657c9d6bad4e5b4979e05 Mon Sep 17 00:00:00 2001
From: Luigi Rizzo <rizzo@icir.org>
Date: Wed, 21 May 2008 11:24:50 +0000
Subject: [PATCH] do not die on SDL_ACTIVEEVENT reporting lost focus.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 channels/console_gui.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/channels/console_gui.c b/channels/console_gui.c
index 1f6c4eb2aa..ebb2d5312d 100644
--- a/channels/console_gui.c
+++ b/channels/console_gui.c
@@ -575,10 +575,12 @@ static void eventhandler(struct video_desc *env, const char *caption)
 				break;
 
 			case SDL_ACTIVEEVENT:
+#if 0 /* do not react, we don't want to die because the window is minimized */
 				if (ev[i].active.gain == 0 && ev[i].active.state & SDL_APPACTIVE) {
 					ast_log(LOG_WARNING, "/* somebody has killed us ? */");
 					ast_cli_command(gui->outfd, "stop now");
 				}
+#endif
 				break;
 
 			case SDL_KEYUP:	/* ignore, for the time being */
-- 
GitLab