summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2012-11-08 12:37:34 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2012-11-30 14:26:51 +0000
commit20907431b9d182d82469b48ea7b7918dc7a97347 (patch)
tree991517ac1d8287cb11200e432085d160035507c7
parent82e426e28393fe83d8b4bf0a3d8f49efa302d4de (diff)
Set default arrow cursor when over one of our windows
-rw-r--r--src/wndproc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/wndproc.c b/src/wndproc.c
index 627a18c..75157bf 100644
--- a/src/wndproc.c
+++ b/src/wndproc.c
@@ -1104,6 +1104,14 @@ winTopLevelWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_XBUTTONUP:
return winMouseButtonsHandle(window, FALSE, HIWORD(wParam) + 5, hWnd);
+
+ case WM_SETCURSOR:
+ if (LOWORD(lParam) == HTCLIENT)
+ {
+ SetCursor(LoadCursor(NULL, IDC_ARROW));
+ return TRUE;
+ }
+ break;
}
return DefWindowProc(hWnd, message, wParam, lParam);
@@ -1127,7 +1135,7 @@ void winInitMultiWindowClass(void)
wcx.cbWndExtra = 0;
wcx.hInstance = GetModuleHandle(NULL);
wcx.hIcon = NULL;
- wcx.hCursor = 0;
+ wcx.hCursor = 0; // we explicitly set the cursor on WM_SETCURSOR
wcx.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
wcx.lpszMenuName = NULL;
wcx.lpszClassName = WINDOW_CLASS_X;