Commit a8fd13a7 authored by chili's avatar chili
Browse files

better handling of activate/deactivate window

parent 11512ff4
......@@ -254,11 +254,13 @@ LRESULT Window::HandleMsg( HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam ) noex
{
OutputDebugString( "activeate => confine\n" );
ConfineCursor();
HideCursor();
}
else
{
OutputDebugString( "activeate => free\n" );
FreeCursor();
ShowCursor();
}
}
break;
......@@ -345,6 +347,12 @@ LRESULT Window::HandleMsg( HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam ) noex
case WM_LBUTTONDOWN:
{
SetForegroundWindow( hWnd );
if( !cursorEnabled )
{
OutputDebugString( "lclick => recapture\n" );
ConfineCursor();
HideCursor();
}
// stifle this mouse message if imgui wants to capture
if( imio.WantCaptureMouse )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment