From fe67c469949acb61bb4538c52827ab9b270d89d0 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sat, 27 Feb 2016 00:08:42 +0100 Subject: [PATCH] more checks --- src/Components/Modules/Window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Components/Modules/Window.cpp b/src/Components/Modules/Window.cpp index 6f588200..9bc11997 100644 --- a/src/Components/Modules/Window.cpp +++ b/src/Components/Modules/Window.cpp @@ -89,7 +89,7 @@ namespace Components int WINAPI Window::ShowCursorHook(BOOL show) { - if (Window::NativeCursor.Get() && GetForegroundWindow() == Window::MainWindow && Window::IsCursorWithin(Window::MainWindow)) + if (Window::NativeCursor.Get() && IsWindow(Window::MainWindow) && GetForegroundWindow() == Window::MainWindow && Window::IsCursorWithin(Window::MainWindow)) { static int count = 0; (show ? ++count : --count); @@ -129,7 +129,7 @@ namespace Components // Draw the cursor if necessary Renderer::OnFrame([] () { - if (Window::NativeCursor.Get() && GetForegroundWindow() == Window::MainWindow && Window::IsCursorWithin(Window::MainWindow)) + if (Window::NativeCursor.Get() && IsWindow(Window::MainWindow) && GetForegroundWindow() == Window::MainWindow && Window::IsCursorWithin(Window::MainWindow)) { int value = 0;