From 0594d04e074581b2768afae989b413296c4687d8 Mon Sep 17 00:00:00 2001
From: nehalmistry <>
Date: Sat, 13 Apr 2002 07:23:08 +0000
Subject: [PATCH] now updates InMainWindow

---
 src/video/sdl.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/video/sdl.cpp b/src/video/sdl.cpp
index df4cc80b4..647daac2b 100644
--- a/src/video/sdl.cpp
+++ b/src/video/sdl.cpp
@@ -73,6 +73,7 @@ local int FrameTicks;			/// Frame length in ms
 local int FrameRemainder;		/// Frame remainder 0.1 ms
 local int FrameFraction;		/// Frame fractional term
 local int SkipFrames;			/// Skip this frames
+global int InMainWindow = 1;		/// cursor inside freecraft window
 
 /*----------------------------------------------------------------------------
 --	Functions
@@ -492,6 +493,7 @@ local void SdlDoEvent(const EventCallback* callbacks, const SDL_Event * event)
 
 	case SDL_ACTIVEEVENT:
 	    DebugLevel3("\tFocus changed\n");
+	    InMainWindow = !InMainWindow;
 	    if (!event->active.state) {
                 InputMouseExit(callbacks,SDL_GetTicks());
 	    }