From 20a9b08c54f183e9e974cfa7f0d64424c153e14e Mon Sep 17 00:00:00 2001 From: Soji Yamakawa Date: Thu, 30 Nov 2023 09:54:30 -0500 Subject: [PATCH] FsShowMouseCursor(0) for Win32 decreases mouse cursor count down to -2 to assure the cursor does not occasionally pop up. --- src/fssimplewindow/src/windows/fswin32wrapper.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fssimplewindow/src/windows/fswin32wrapper.cpp b/src/fssimplewindow/src/windows/fswin32wrapper.cpp index 1f3086e..cd5a785 100644 --- a/src/fssimplewindow/src/windows/fswin32wrapper.cpp +++ b/src/fssimplewindow/src/windows/fswin32wrapper.cpp @@ -1202,7 +1202,10 @@ void FsShowMouseCursor(int showFlag) } else { - while(0<=ShowCursor(FALSE)); + // 2023/11/30 + // Something occasionally increases the cursor count and decrease again. + // I need to decrement to -1 to assure the cursor is hidden all the time. + while(-1<=ShowCursor(FALSE)); } }