1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +00:00

Fix no cursor on window frame and title bar.

Remove mouse capture and handle visibility via WM_SETCURSOR messages
instead of window activation events. See
aed7e97d0d
for original implementation
This commit is contained in:
2012-10-03 20:07:54 -04:00
parent a760e3dc35
commit 87b441e890
5 changed files with 21 additions and 32 deletions

View File

@ -59,6 +59,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pfCrashHandler/plCrashCli.h"
#include "plNetClient/plNetClientMgr.h"
#include "plNetClient/plNetLinkingMgr.h"
#include "plInputCore/plInputDevice.h"
#include "plInputCore/plInputManager.h"
#include "plUnifiedTime/plUnifiedTime.h"
#include "plPipeline.h"
@ -457,6 +458,26 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
}
break;
case WM_SETCURSOR:
{
static bool winCursor = true;
bool enterWnd = LOWORD(lParam) == HTCLIENT;
if (enterWnd && winCursor)
{
winCursor = !winCursor;
ShowCursor(winCursor != 0);
plMouseDevice::ShowCursor();
}
else if (!enterWnd && !winCursor)
{
winCursor = !winCursor;
ShowCursor(winCursor != 0);
plMouseDevice::HideCursor();
}
return TRUE;
}
break;
case WM_ACTIVATE:
{
bool active = (LOWORD(wParam) == WA_ACTIVE || LOWORD(wParam) == WA_CLICKACTIVE);