diff --git a/Program.cs b/Program.cs index 35d7381..aa3c23c 100644 --- a/Program.cs +++ b/Program.cs @@ -425,7 +425,10 @@ public class Game : GameWindow { toast.Update(e.Time); KeyboardState input = KeyboardState; - if (input.IsAnyKeyDown || MouseState.IsAnyButtonDown || MouseState.Delta != Vector2i.Zero) { + bool mouseInWindow = ClientRectangle.ContainsInclusive((Vector2i) MouseState.Position); + if (input.IsAnyKeyDown || + MouseState.IsAnyButtonDown || + (mouseInWindow && MouseState.Delta != Vector2i.Zero)) { timeSinceEvent = 0; } else { timeSinceEvent += e.Time;