summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAnsariel <none@none>2017-10-16 10:41:45 +0200
committerAnsariel <none@none>2017-10-16 10:41:45 +0200
commitf1c76a376c1aeb194ddf7cfddc7e50fd4a9645af (patch)
tree17a1164544d97d65e17c68e2a62e36cf010588c3 /indra
parent8c0388119318ee99084140845931eaa8a493339d (diff)
STORM-2151: Respect "Hide cursor while typing" user setting on Windows
Diffstat (limited to 'indra')
-rw-r--r--indra/llwindow/llwindowwin32.cpp19
-rw-r--r--indra/llwindow/llwindowwin32.h2
2 files changed, 20 insertions, 1 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index b5ed53fd4f..62179e4d80 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -421,6 +421,11 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
mKeyVirtualKey = 0;
mhDC = NULL;
mhRC = NULL;
+
+ if (!SystemParametersInfo(SPI_GETMOUSEVANISH, 0, &mMouseVanish, 0))
+ {
+ mMouseVanish = TRUE;
+ }
// Initialize the keyboard
gKeyboard = new LLKeyboardWin32();
@@ -1680,7 +1685,7 @@ void LLWindowWin32::showCursorFromMouseMove()
void LLWindowWin32::hideCursorUntilMouseMove()
{
- if (!mHideCursorPermanent)
+ if (!mHideCursorPermanent && mMouseVanish)
{
hideCursor();
mHideCursorPermanent = FALSE;
@@ -2668,6 +2673,18 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
return 0;
break;
+
+ case WM_SETTINGCHANGE:
+ {
+ if (w_param == SPI_SETMOUSEVANISH)
+ {
+ if (!SystemParametersInfo(SPI_GETMOUSEVANISH, 0, &window_imp->mMouseVanish, 0))
+ {
+ window_imp->mMouseVanish = TRUE;
+ }
+ }
+ }
+ break;
}
window_imp->mCallbacks->handlePauseWatchdog(window_imp);
diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h
index 39ef9b31a4..cd6e5e4fa8 100644
--- a/indra/llwindow/llwindowwin32.h
+++ b/indra/llwindow/llwindowwin32.h
@@ -214,6 +214,8 @@ protected:
U32 mRawWParam;
U32 mRawLParam;
+ BOOL mMouseVanish;
+
friend class LLWindowManager;
};