Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Clark Lin
hw3d
Commits
a8fd13a7
Commit
a8fd13a7
authored
Jul 01, 2019
by
chili
Browse files
better handling of activate/deactivate window
parent
11512ff4
Changes
1
Show whitespace changes
Inline
Side-by-side
hw3d/Window.cpp
View file @
a8fd13a7
...
@@ -254,11 +254,13 @@ LRESULT Window::HandleMsg( HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam ) noex
...
@@ -254,11 +254,13 @@ LRESULT Window::HandleMsg( HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam ) noex
{
{
OutputDebugString
(
"activeate => confine
\n
"
);
OutputDebugString
(
"activeate => confine
\n
"
);
ConfineCursor
();
ConfineCursor
();
HideCursor
();
}
}
else
else
{
{
OutputDebugString
(
"activeate => free
\n
"
);
OutputDebugString
(
"activeate => free
\n
"
);
FreeCursor
();
FreeCursor
();
ShowCursor
();
}
}
}
}
break
;
break
;
...
@@ -345,6 +347,12 @@ LRESULT Window::HandleMsg( HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam ) noex
...
@@ -345,6 +347,12 @@ LRESULT Window::HandleMsg( HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam ) noex
case
WM_LBUTTONDOWN
:
case
WM_LBUTTONDOWN
:
{
{
SetForegroundWindow
(
hWnd
);
SetForegroundWindow
(
hWnd
);
if
(
!
cursorEnabled
)
{
OutputDebugString
(
"lclick => recapture
\n
"
);
ConfineCursor
();
HideCursor
();
}
// stifle this mouse message if imgui wants to capture
// stifle this mouse message if imgui wants to capture
if
(
imio
.
WantCaptureMouse
)
if
(
imio
.
WantCaptureMouse
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment