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
8f88d4fe
Commit
8f88d4fe
authored
Mar 01, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Pass a window handle for keyboard hardware messages too.
parent
39c4e6d1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
event.c
dlls/winex11.drv/event.c
+1
-1
keyboard.c
dlls/winex11.drv/keyboard.c
+12
-12
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-1
No files found.
dlls/winex11.drv/event.c
View file @
8f88d4fe
...
...
@@ -1568,7 +1568,7 @@ UINT CDECL X11DRV_SendInput( UINT count, LPINPUT inputs, int size )
inputs
->
u
.
mi
.
dwExtraInfo
,
LLMHF_INJECTED
);
break
;
case
INPUT_KEYBOARD
:
X11DRV_send_keyboard_input
(
inputs
->
u
.
ki
.
wVk
,
inputs
->
u
.
ki
.
wScan
,
inputs
->
u
.
ki
.
dwFlags
,
X11DRV_send_keyboard_input
(
0
,
inputs
->
u
.
ki
.
wVk
,
inputs
->
u
.
ki
.
wScan
,
inputs
->
u
.
ki
.
dwFlags
,
inputs
->
u
.
ki
.
time
,
inputs
->
u
.
ki
.
dwExtraInfo
,
LLKHF_INJECTED
);
break
;
case
INPUT_HARDWARE
:
...
...
dlls/winex11.drv/keyboard.c
View file @
8f88d4fe
...
...
@@ -1150,7 +1150,7 @@ static WORD EVENT_event_to_vkey( XIC xic, XKeyEvent *e)
/***********************************************************************
* X11DRV_send_keyboard_input
*/
void
X11DRV_send_keyboard_input
(
WORD
wVk
,
WORD
wScan
,
DWORD
event_flags
,
DWORD
time
,
void
X11DRV_send_keyboard_input
(
HWND
hwnd
,
WORD
wVk
,
WORD
wScan
,
DWORD
event_flags
,
DWORD
time
,
DWORD
dwExtraInfo
,
UINT
injected_flags
)
{
UINT
message
;
...
...
@@ -1268,7 +1268,7 @@ void X11DRV_send_keyboard_input( WORD wVk, WORD wScan, DWORD event_flags, DWORD
SERVER_START_REQ
(
send_hardware_message
)
{
req
->
id
=
(
injected_flags
&
LLKHF_INJECTED
)
?
0
:
GetCurrentThreadId
();
req
->
win
=
0
;
req
->
win
=
wine_server_user_handle
(
hwnd
)
;
req
->
msg
=
message
;
req
->
wparam
=
wVk
;
req
->
lparam
=
lParam
;
...
...
@@ -1286,7 +1286,7 @@ void X11DRV_send_keyboard_input( WORD wVk, WORD wScan, DWORD event_flags, DWORD
* Updates internal state for <vkey>, depending on key <state> under X
*
*/
static
inline
void
KEYBOARD_UpdateOneState
(
WORD
vkey
,
WORD
scan
,
int
state
,
DWORD
time
)
static
inline
void
KEYBOARD_UpdateOneState
(
HWND
hwnd
,
WORD
vkey
,
WORD
scan
,
int
state
,
DWORD
time
)
{
/* Do something if internal table state != X state for keycode */
if
(((
key_state_table
[
vkey
&
0xff
]
&
0x80
)
!=
0
)
!=
state
)
...
...
@@ -1299,7 +1299,7 @@ static inline void KEYBOARD_UpdateOneState ( WORD vkey, WORD scan, int state, DW
vkey
,
key_state_table
[
vkey
&
0xff
]);
/* Fake key being pressed inside wine */
X11DRV_send_keyboard_input
(
vkey
&
0xff
,
scan
&
0xff
,
flags
,
time
,
0
,
0
);
X11DRV_send_keyboard_input
(
hwnd
,
vkey
&
0xff
,
scan
&
0xff
,
flags
,
time
,
0
,
0
);
TRACE
(
"State after %#.2x
\n
"
,
key_state_table
[
vkey
&
0xff
]);
}
...
...
@@ -1338,21 +1338,21 @@ void X11DRV_KeymapNotify( HWND hwnd, XEvent *event )
case
VK_RCONTROL
:
case
VK_LSHIFT
:
case
VK_RSHIFT
:
KEYBOARD_UpdateOneState
(
vkey
,
scan
,
state
,
time
);
KEYBOARD_UpdateOneState
(
hwnd
,
vkey
,
scan
,
state
,
time
);
break
;
}
}
}
}
static
void
update_lock_state
(
BYTE
vkey
,
WORD
scan
,
DWORD
time
)
static
void
update_lock_state
(
HWND
hwnd
,
BYTE
vkey
,
WORD
scan
,
DWORD
time
)
{
DWORD
flags
=
vkey
==
VK_NUMLOCK
?
KEYEVENTF_EXTENDEDKEY
:
0
;
if
(
key_state_table
[
vkey
]
&
0x80
)
flags
^=
KEYEVENTF_KEYUP
;
X11DRV_send_keyboard_input
(
vkey
,
scan
,
flags
,
time
,
0
,
0
);
X11DRV_send_keyboard_input
(
vkey
,
scan
,
flags
^
KEYEVENTF_KEYUP
,
time
,
0
,
0
);
X11DRV_send_keyboard_input
(
hwnd
,
vkey
,
scan
,
flags
,
time
,
0
,
0
);
X11DRV_send_keyboard_input
(
hwnd
,
vkey
,
scan
,
flags
^
KEYEVENTF_KEYUP
,
time
,
0
,
0
);
}
/***********************************************************************
...
...
@@ -1461,7 +1461,7 @@ void X11DRV_KeyEvent( HWND hwnd, XEvent *xev )
vkey
!=
VK_CAPITAL
)
{
TRACE
(
"Adjusting CapsLock state (%#.2x)
\n
"
,
key_state_table
[
VK_CAPITAL
]);
update_lock_state
(
VK_CAPITAL
,
0x3A
,
event_time
);
update_lock_state
(
hwnd
,
VK_CAPITAL
,
0x3A
,
event_time
);
}
/* Adjust the NUMLOCK state if it has been changed outside wine */
...
...
@@ -1469,7 +1469,7 @@ void X11DRV_KeyEvent( HWND hwnd, XEvent *xev )
(
vkey
&
0xff
)
!=
VK_NUMLOCK
)
{
TRACE
(
"Adjusting NumLock state (%#.2x)
\n
"
,
key_state_table
[
VK_NUMLOCK
]);
update_lock_state
(
VK_NUMLOCK
,
0x45
,
event_time
);
update_lock_state
(
hwnd
,
VK_NUMLOCK
,
0x45
,
event_time
);
}
/* Adjust the SCROLLLOCK state if it has been changed outside wine */
...
...
@@ -1477,13 +1477,13 @@ void X11DRV_KeyEvent( HWND hwnd, XEvent *xev )
vkey
!=
VK_SCROLL
)
{
TRACE
(
"Adjusting ScrLock state (%#.2x)
\n
"
,
key_state_table
[
VK_SCROLL
]);
update_lock_state
(
VK_SCROLL
,
0x46
,
event_time
);
update_lock_state
(
hwnd
,
VK_SCROLL
,
0x46
,
event_time
);
}
bScan
=
keyc2scan
[
event
->
keycode
]
&
0xFF
;
TRACE_
(
key
)(
"bScan = 0x%02x.
\n
"
,
bScan
);
X11DRV_send_keyboard_input
(
vkey
&
0xff
,
bScan
,
dwFlags
,
event_time
,
0
,
0
);
X11DRV_send_keyboard_input
(
hwnd
,
vkey
&
0xff
,
bScan
,
dwFlags
,
event_time
,
0
,
0
);
}
/**********************************************************************
...
...
dlls/winex11.drv/x11drv.h
View file @
8f88d4fe
...
...
@@ -804,7 +804,7 @@ extern void set_window_cursor( struct x11drv_win_data *data, HCURSOR handle );
extern
void
sync_window_cursor
(
struct
x11drv_win_data
*
data
);
extern
BOOL
CDECL
X11DRV_ClipCursor
(
LPCRECT
clip
);
extern
void
X11DRV_InitKeyboard
(
Display
*
display
);
extern
void
X11DRV_send_keyboard_input
(
WORD
wVk
,
WORD
wScan
,
DWORD
dwFlags
,
DWORD
time
,
extern
void
X11DRV_send_keyboard_input
(
HWND
hwnd
,
WORD
wVk
,
WORD
wScan
,
DWORD
dwFlags
,
DWORD
time
,
DWORD
dwExtraInfo
,
UINT
injected_flags
);
extern
void
X11DRV_send_mouse_input
(
HWND
hwnd
,
DWORD
flags
,
DWORD
x
,
DWORD
y
,
DWORD
data
,
DWORD
time
,
DWORD
extra_info
,
UINT
injected_flags
);
...
...
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