Skip to content

Commit 1a28d77

Browse files
authored
Fix Issue #27
Proposed changes mentioned in issue #27
1 parent 6b2c655 commit 1a28d77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ImGui.NET.SampleProgram/SampleWindow.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ private unsafe void UpdateImGuiInput(IO io)
319319
MouseState cursorState = Mouse.GetCursorState();
320320
MouseState mouseState = Mouse.GetState();
321321

322-
if (_nativeWindow.Bounds.Contains(cursorState.X, cursorState.Y))
322+
if (_nativeWindow.Focused)
323323
{
324324
Point windowPoint = _nativeWindow.PointToClient(new Point(cursorState.X, cursorState.Y));
325325
io.MousePosition = new System.Numerics.Vector2(windowPoint.X / io.DisplayFramebufferScale.X, windowPoint.Y / io.DisplayFramebufferScale.Y);

0 commit comments

Comments
 (0)