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
9731d449
Commit
9731d449
authored
Mar 02, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Set the message code for keyboard input on the server side.
parent
02e30f5f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
4 deletions
+45
-4
queue.c
server/queue.c
+45
-4
No files found.
server/queue.c
View file @
9731d449
...
...
@@ -1361,8 +1361,7 @@ static void queue_mouse_message( struct desktop *desktop, user_handle_t win, uns
}
/* queue a hardware message for a keyboard event */
static
void
queue_keyboard_message
(
struct
desktop
*
desktop
,
user_handle_t
win
,
unsigned
int
message
,
const
hw_input_t
*
input
)
static
void
queue_keyboard_message
(
struct
desktop
*
desktop
,
user_handle_t
win
,
const
hw_input_t
*
input
)
{
struct
hardware_msg_data
*
msg_data
;
struct
message
*
msg
;
...
...
@@ -1378,7 +1377,6 @@ static void queue_keyboard_message( struct desktop *desktop, user_handle_t win,
msg
->
type
=
MSG_HARDWARE
;
msg
->
win
=
get_user_full_handle
(
win
);
msg
->
msg
=
message
;
msg
->
lparam
=
(
input
->
kbd
.
scan
<<
16
)
|
1
;
/* repeat count */
msg
->
time
=
input
->
kbd
.
time
;
msg
->
result
=
NULL
;
...
...
@@ -1419,6 +1417,49 @@ static void queue_keyboard_message( struct desktop *desktop, user_handle_t win,
msg
->
wparam
=
vkey
;
}
msg
->
msg
=
(
input
->
kbd
.
flags
&
KEYEVENTF_KEYUP
)
?
WM_KEYUP
:
WM_KEYDOWN
;
switch
(
vkey
)
{
case
VK_LMENU
:
case
VK_RMENU
:
if
(
input
->
kbd
.
flags
&
KEYEVENTF_KEYUP
)
{
/* send WM_SYSKEYUP if Alt still pressed and no other key in between */
/* we use 0x02 as a flag to track if some other SYSKEYUP was sent already */
if
((
desktop
->
keystate
[
VK_MENU
]
&
0x82
)
!=
0x82
)
break
;
msg
->
msg
=
WM_SYSKEYUP
;
desktop
->
keystate
[
VK_MENU
]
&=
~
0x02
;
}
else
{
/* send WM_SYSKEYDOWN for Alt except with Ctrl */
if
(
desktop
->
keystate
[
VK_CONTROL
]
&
0x80
)
break
;
msg
->
msg
=
WM_SYSKEYDOWN
;
desktop
->
keystate
[
VK_MENU
]
|=
0x02
;
}
break
;
case
VK_LCONTROL
:
case
VK_RCONTROL
:
/* send WM_SYSKEYUP on release if Alt still pressed */
if
(
!
(
input
->
kbd
.
flags
&
KEYEVENTF_KEYUP
))
break
;
if
(
!
(
desktop
->
keystate
[
VK_MENU
]
&
0x80
))
break
;
msg
->
msg
=
WM_SYSKEYUP
;
desktop
->
keystate
[
VK_MENU
]
&=
~
0x02
;
break
;
default:
/* send WM_SYSKEY for Alt-anykey and for F10 */
if
(
desktop
->
keystate
[
VK_CONTROL
]
&
0x80
)
break
;
if
(
!
(
desktop
->
keystate
[
VK_MENU
]
&
0x80
))
break
;
/* fall through */
case
VK_F10
:
msg
->
msg
=
(
input
->
kbd
.
flags
&
KEYEVENTF_KEYUP
)
?
WM_SYSKEYUP
:
WM_SYSKEYDOWN
;
desktop
->
keystate
[
VK_MENU
]
&=
~
0x02
;
break
;
}
queue_hardware_message
(
desktop
,
msg
);
}
...
...
@@ -1879,7 +1920,7 @@ DECL_HANDLER(send_hardware_message)
queue_mouse_message
(
desktop
,
req
->
win
,
req
->
msg
,
&
req
->
input
);
break
;
case
INPUT_KEYBOARD
:
queue_keyboard_message
(
desktop
,
req
->
win
,
req
->
msg
,
&
req
->
input
);
queue_keyboard_message
(
desktop
,
req
->
win
,
&
req
->
input
);
break
;
case
INPUT_HARDWARE
:
queue_custom_hardware_message
(
desktop
,
req
->
win
,
&
req
->
input
);
...
...
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