Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b58c170c
Commit
b58c170c
authored
Mar 09, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the SwapMouseButton function and the SPI_SETMOUSEBUTTONSWAP
parameter work on the same flag.
parent
1bc2caad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
21 deletions
+17
-21
sysparams.c
dlls/user/sysparams.c
+9
-0
input.c
windows/input.c
+8
-21
No files found.
dlls/user/sysparams.c
View file @
b58c170c
...
...
@@ -2683,6 +2683,15 @@ INT WINAPI GetSystemMetrics( INT index )
}
/***********************************************************************
* SwapMouseButton (USER32.@)
*/
BOOL
WINAPI
SwapMouseButton
(
BOOL
fSwap
)
{
return
SystemParametersInfoW
(
SPI_SETMOUSEBUTTONSWAP
,
fSwap
,
0
,
0
);
}
/**********************************************************************
* SetDoubleClickTime (USER32.@)
*/
...
...
windows/input.c
View file @
b58c170c
...
...
@@ -52,12 +52,10 @@ WINE_DECLARE_DEBUG_CHANNEL(keyboard);
WINE_DECLARE_DEBUG_CHANNEL
(
win
);
WINE_DEFAULT_DEBUG_CHANNEL
(
event
);
static
BOOL
SwappedButtons
;
BYTE
InputKeyStateTable
[
256
];
BYTE
AsyncKeyStateTable
[
256
];
BYTE
TrackSysKey
=
0
;
/* determine whether ALT key up will cause a WM_SYSKEYUP
or a WM_KEYUP message */
static
BYTE
AsyncKeyStateTable
[
256
];
static
BYTE
TrackSysKey
=
0
;
/* determine whether ALT key up will cause a WM_SYSKEYUP
or a WM_KEYUP message */
/* Storage for the USER-maintained mouse positions */
static
DWORD
PosX
,
PosY
;
...
...
@@ -91,7 +89,7 @@ static WORD get_key_state(void)
{
WORD
ret
=
0
;
if
(
SwappedButtons
)
if
(
GetSystemMetrics
(
SM_SWAPBUTTON
)
)
{
if
(
InputKeyStateTable
[
VK_RBUTTON
]
&
0x80
)
ret
|=
MK_LBUTTON
;
if
(
InputKeyStateTable
[
VK_LBUTTON
]
&
0x80
)
ret
|=
MK_RBUTTON
;
...
...
@@ -292,26 +290,26 @@ static void queue_mouse_event( const MOUSEINPUT *mi, UINT flags )
{
InputKeyStateTable
[
VK_LBUTTON
]
|=
0x80
;
AsyncKeyStateTable
[
VK_LBUTTON
]
|=
0x80
;
queue_raw_mouse_message
(
SwappedButtons
?
WM_RBUTTONDOWN
:
WM_LBUTTONDOWN
,
queue_raw_mouse_message
(
GetSystemMetrics
(
SM_SWAPBUTTON
)
?
WM_RBUTTONDOWN
:
WM_LBUTTONDOWN
,
flags
,
PosX
,
PosY
,
mi
);
}
if
(
mi
->
dwFlags
&
MOUSEEVENTF_LEFTUP
)
{
InputKeyStateTable
[
VK_LBUTTON
]
&=
~
0x80
;
queue_raw_mouse_message
(
SwappedButtons
?
WM_RBUTTONUP
:
WM_LBUTTONUP
,
queue_raw_mouse_message
(
GetSystemMetrics
(
SM_SWAPBUTTON
)
?
WM_RBUTTONUP
:
WM_LBUTTONUP
,
flags
,
PosX
,
PosY
,
mi
);
}
if
(
mi
->
dwFlags
&
MOUSEEVENTF_RIGHTDOWN
)
{
InputKeyStateTable
[
VK_RBUTTON
]
|=
0x80
;
AsyncKeyStateTable
[
VK_RBUTTON
]
|=
0x80
;
queue_raw_mouse_message
(
SwappedButtons
?
WM_LBUTTONDOWN
:
WM_RBUTTONDOWN
,
queue_raw_mouse_message
(
GetSystemMetrics
(
SM_SWAPBUTTON
)
?
WM_LBUTTONDOWN
:
WM_RBUTTONDOWN
,
flags
,
PosX
,
PosY
,
mi
);
}
if
(
mi
->
dwFlags
&
MOUSEEVENTF_RIGHTUP
)
{
InputKeyStateTable
[
VK_RBUTTON
]
&=
~
0x80
;
queue_raw_mouse_message
(
SwappedButtons
?
WM_LBUTTONUP
:
WM_RBUTTONUP
,
queue_raw_mouse_message
(
GetSystemMetrics
(
SM_SWAPBUTTON
)
?
WM_LBUTTONUP
:
WM_RBUTTONUP
,
flags
,
PosX
,
PosY
,
mi
);
}
if
(
mi
->
dwFlags
&
MOUSEEVENTF_MIDDLEDOWN
)
...
...
@@ -402,17 +400,6 @@ void WINAPI mouse_event( DWORD dwFlags, DWORD dx, DWORD dy,
/***********************************************************************
* SwapMouseButton (USER32.@)
*/
BOOL
WINAPI
SwapMouseButton
(
BOOL
fSwap
)
{
BOOL
ret
=
SwappedButtons
;
SwappedButtons
=
fSwap
;
return
ret
;
}
/***********************************************************************
* GetCursorPos (USER32.@)
*/
BOOL
WINAPI
GetCursorPos
(
POINT
*
pt
)
...
...
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