Fixed cursor hiding on win32. Still fails occassionally.

This commit is contained in:
crs 2004-02-29 21:32:00 +00:00
parent 77dd4c81c4
commit 4ac756fc28
1 changed files with 15 additions and 2 deletions

View File

@ -1612,11 +1612,23 @@ CMSWindowsScreen::secondaryDeskProc(
{
switch (msg) {
case WM_MOUSEMOVE:
case WM_ACTIVATE:
case WM_ACTIVATEAPP:
// hide window
ShowWindow(hwnd, SW_HIDE);
break;
case WM_ACTIVATE:
// hide window
if (LOWORD(wParam) == WA_INACTIVE) {
ShowWindow(hwnd, SW_HIDE);
}
break;
case WM_ACTIVATEAPP:
// hide window
if (!(BOOL)wParam) {
ShowWindow(hwnd, SW_HIDE);
}
break;
}
return DefWindowProc(hwnd, msg, wParam, lParam);
@ -1726,6 +1738,7 @@ CMSWindowsScreen::deskLeave(CDesk* desk, DWORD& cursorThreadID)
if (desk->m_lowLevel) {
SetWindowPos(desk->m_window, HWND_TOPMOST,
m_xCenter, m_yCenter, 1, 1, SWP_NOACTIVATE);
ShowWindow(desk->m_window, SW_SHOW);
if (cursorThreadID == 0) {
HWND hwnd = GetForegroundWindow();
cursorThreadID = GetWindowThreadProcessId(hwnd, NULL);