1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 18:59:09 +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

@ -750,27 +750,3 @@ bool plMouseDevice::MsgReceive(plMessage* msg)
}
return false;
}
void plMouseDevice::HandleWindowActivate(bool bActive, HWND hWnd)
{
if ( bActive )
{
RECT rect;
::GetClientRect(hWnd,&rect);
// rect.right /= plInputManager::GetInstance()->GetMouseScale();
// rect.bottom /= plInputManager::GetInstance()->GetMouseScale();
::MapWindowPoints( hWnd, NULL, (POINT *)&rect, 2 );
::ShowCursor( FALSE );
SetCapture(hWnd);
}
else
{
ReleaseCapture();
::ShowCursor( TRUE );
}
}

View File

@ -160,7 +160,6 @@ public:
~plMouseDevice();
const char* GetInputName() { return "mouse"; }
void HandleWindowActivate(bool bActive, hsWindowHndl hWnd);
bool HasControlFlag(int f) const { return fControlFlags.IsBitSet(f); }
void SetControlFlag(int f)

View File

@ -584,8 +584,6 @@ void plDInputMgr::AddDevice(IDirectInputDevice8* device)
void plDInputMgr::ConfigureDevice()
{
::ShowCursor( TRUE );
ReleaseCapture();
DICOLORSET dics;
ZeroMemory(&dics, sizeof(DICOLORSET));
@ -607,8 +605,6 @@ void plDInputMgr::ConfigureDevice()
fDI->fSticks[i]->fDevice->SetActionMap( fDI->fActionFormat, NULL, DIDSAM_FORCESAVE );
::ShowCursor( FALSE );
SetCapture(fhWnd);
}
bool plDInputMgr::MsgReceive(plMessage* msg)