Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7e6d0e71
Commit
7e6d0e71
authored
Oct 07, 2007
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Oct 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Use ClipCursor() to keep mouse from leaving the window.
parent
d9d11b3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
mouse.c
dlls/dinput/mouse.c
+14
-0
No files found.
dlls/dinput/mouse.c
View file @
7e6d0e71
...
...
@@ -410,7 +410,18 @@ static HRESULT WINAPI SysMouseAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface)
/* Install our mouse hook */
if
(
This
->
base
.
dwCoopLevel
&
DISCL_EXCLUSIVE
)
{
RECT
rc
;
ShowCursor
(
FALSE
);
/* hide cursor */
if
(
GetWindowRect
(
This
->
base
.
win
,
&
rc
))
{
FIXME
(
"Clipping cursor to %s
\n
"
,
wine_dbgstr_rect
(
&
rc
));
ClipCursor
(
&
rc
);
}
else
ERR
(
"Failed to get RECT: %d
\n
"
,
GetLastError
());
}
/* Get the window dimension and find the center */
GetWindowRect
(
This
->
base
.
win
,
&
rect
);
...
...
@@ -446,7 +457,10 @@ static HRESULT WINAPI SysMouseAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
if
((
res
=
IDirectInputDevice2AImpl_Unacquire
(
iface
))
!=
DI_OK
)
return
res
;
if
(
This
->
base
.
dwCoopLevel
&
DISCL_EXCLUSIVE
)
{
ClipCursor
(
NULL
);
ShowCursor
(
TRUE
);
/* show cursor */
}
/* And put the mouse cursor back where it was at acquire time */
if
(
This
->
base
.
dwCoopLevel
&
DISCL_EXCLUSIVE
)
...
...
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