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:
@ -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);
|
||||
|
Reference in New Issue
Block a user