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
938657b1
Commit
938657b1
authored
Dec 20, 2006
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Dec 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Warp mouse in exclusive cooperation mode only.
parent
546c7a50
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
mouse.c
dlls/dinput/mouse.c
+3
-3
No files found.
dlls/dinput/mouse.c
View file @
938657b1
...
...
@@ -311,7 +311,7 @@ static LRESULT CALLBACK dinput_mouse_hook( int code, WPARAM wparam, LPARAM lpara
queue_event
((
LPDIRECTINPUTDEVICE8A
)
This
,
This
->
base
.
data_format
.
offsets
[
WINE_MOUSE_Y_POSITION
],
pt1
.
y
,
hook
->
time
,
This
->
dinput
->
evsequence
);
This
->
need_warp
=
(
pt
.
x
||
pt
.
y
);
This
->
need_warp
=
(
pt
.
x
||
pt
.
y
)
&&
dwCoop
&
DISCL_EXCLUSIVE
;
break
;
}
case
WM_LBUTTONDOWN
:
...
...
@@ -434,7 +434,7 @@ static HRESULT WINAPI SysMouseAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface)
This
->
win_centerY
=
(
rect
.
bottom
-
rect
.
top
)
/
2
;
/* Warp the mouse to the center of the window */
if
(
!
(
This
->
base
.
data_format
.
user_df
->
dwFlags
&
DIDF_ABSAXIS
)
)
if
(
This
->
base
.
dwCoopLevel
&
DISCL_EXCLUSIVE
)
{
This
->
mapped_center
.
x
=
This
->
win_centerX
;
This
->
mapped_center
.
y
=
This
->
win_centerY
;
...
...
@@ -472,7 +472,7 @@ static HRESULT WINAPI SysMouseAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
ERR
(
"this(%p) != current_lock(%p)
\n
"
,
This
,
current_lock
);
/* And put the mouse cursor back where it was at acquire time */
if
(
!
(
This
->
base
.
data_format
.
user_df
->
dwFlags
&
DIDF_ABSAXIS
)
)
if
(
This
->
base
.
dwCoopLevel
&
DISCL_EXCLUSIVE
)
{
TRACE
(
" warping mouse back to (%d , %d)
\n
"
,
This
->
org_coords
.
x
,
This
->
org_coords
.
y
);
SetCursorPos
(
This
->
org_coords
.
x
,
This
->
org_coords
.
y
);
...
...
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