From 2c3d9e3ab8771b24deff0d72452f8d2f8769b764 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 28 Dec 2015 16:19:08 +0200 Subject: [PATCH] Fixed mouse capturing when video isn't initialized yet --- src/posix/cocoa/i_video.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm index 768d147a9..9fbeb6ffa 100644 --- a/src/posix/cocoa/i_video.mm +++ b/src/posix/cocoa/i_video.mm @@ -567,6 +567,8 @@ void CocoaVideo::SetWindowVisible(bool visible) { [video->m_window orderOut:nil]; } + + I_SetNativeMouse(!visible); } } @@ -1248,5 +1250,4 @@ NSSize I_GetContentViewSize(const NSWindow* const window) void I_SetMainWindowVisible(bool visible) { CocoaVideo::SetWindowVisible(visible); - I_SetNativeMouse(!visible); }