Fixed cursor hiding on win32. Still fails occassionally.
This commit is contained in:
parent
77dd4c81c4
commit
4ac756fc28
|
@ -1612,11 +1612,23 @@ CMSWindowsScreen::secondaryDeskProc(
|
||||||
{
|
{
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case WM_MOUSEMOVE:
|
case WM_MOUSEMOVE:
|
||||||
case WM_ACTIVATE:
|
|
||||||
case WM_ACTIVATEAPP:
|
|
||||||
// hide window
|
// hide window
|
||||||
ShowWindow(hwnd, SW_HIDE);
|
ShowWindow(hwnd, SW_HIDE);
|
||||||
break;
|
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);
|
return DefWindowProc(hwnd, msg, wParam, lParam);
|
||||||
|
@ -1726,6 +1738,7 @@ CMSWindowsScreen::deskLeave(CDesk* desk, DWORD& cursorThreadID)
|
||||||
if (desk->m_lowLevel) {
|
if (desk->m_lowLevel) {
|
||||||
SetWindowPos(desk->m_window, HWND_TOPMOST,
|
SetWindowPos(desk->m_window, HWND_TOPMOST,
|
||||||
m_xCenter, m_yCenter, 1, 1, SWP_NOACTIVATE);
|
m_xCenter, m_yCenter, 1, 1, SWP_NOACTIVATE);
|
||||||
|
ShowWindow(desk->m_window, SW_SHOW);
|
||||||
if (cursorThreadID == 0) {
|
if (cursorThreadID == 0) {
|
||||||
HWND hwnd = GetForegroundWindow();
|
HWND hwnd = GetForegroundWindow();
|
||||||
cursorThreadID = GetWindowThreadProcessId(hwnd, NULL);
|
cursorThreadID = GetWindowThreadProcessId(hwnd, NULL);
|
||||||
|
|
Loading…
Reference in New Issue