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
a02c3ae7
Commit
a02c3ae7
authored
Jul 13, 2015
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jul 14, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: On KeymapNotify event also sychronize WinKey state.
parent
770e15ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
keyboard.c
dlls/winex11.drv/keyboard.c
+22
-0
No files found.
dlls/winex11.drv/keyboard.c
View file @
a02c3ae7
...
...
@@ -1233,6 +1233,7 @@ void X11DRV_KeymapNotify( HWND hwnd, XEvent *event )
WORD
vkey
;
BOOL
pressed
;
}
modifiers
[
6
];
/* VK_LSHIFT through VK_RMENU are contiguous */
BOOL
lwin_pressed
=
FALSE
,
rwin_pressed
=
FALSE
;
if
(
!
get_async_key_state
(
keystate
))
return
;
...
...
@@ -1264,6 +1265,12 @@ void X11DRV_KeymapNotify( HWND hwnd, XEvent *event )
if
(
!
modifiers
[
m
].
vkey
)
modifiers
[
m
].
vkey
=
vkey
;
if
(
event
->
xkeymap
.
key_vector
[
i
]
&
(
1
<<
j
))
modifiers
[
m
].
pressed
=
TRUE
;
break
;
case
VK_LWIN
:
if
(
event
->
xkeymap
.
key_vector
[
i
]
&
(
1
<<
j
))
lwin_pressed
=
TRUE
;
break
;
case
VK_RWIN
:
if
(
event
->
xkeymap
.
key_vector
[
i
]
&
(
1
<<
j
))
rwin_pressed
=
TRUE
;
break
;
}
}
}
...
...
@@ -1281,12 +1288,27 @@ void X11DRV_KeymapNotify( HWND hwnd, XEvent *event )
}
}
if
(
!
(
keystate
[
VK_LWIN
]
&
0x80
)
!=
!
lwin_pressed
)
{
TRACE
(
"Adjusting state for VK_LWIN. State before %#.2x
\n
"
,
keystate
[
VK_LWIN
]);
update_key_state
(
keystate
,
VK_LWIN
,
lwin_pressed
);
changed
=
TRUE
;
}
if
(
!
(
keystate
[
VK_RWIN
]
&
0x80
)
!=
!
rwin_pressed
)
{
TRACE
(
"Adjusting state for VK_RWIN. State before %#.2x
\n
"
,
keystate
[
VK_RWIN
]);
update_key_state
(
keystate
,
VK_RWIN
,
rwin_pressed
);
changed
=
TRUE
;
}
LeaveCriticalSection
(
&
kbd_section
);
if
(
!
changed
)
return
;
update_key_state
(
keystate
,
VK_CONTROL
,
(
keystate
[
VK_LCONTROL
]
|
keystate
[
VK_RCONTROL
])
&
0x80
);
update_key_state
(
keystate
,
VK_MENU
,
(
keystate
[
VK_LMENU
]
|
keystate
[
VK_RMENU
])
&
0x80
);
update_key_state
(
keystate
,
VK_SHIFT
,
(
keystate
[
VK_LSHIFT
]
|
keystate
[
VK_RSHIFT
])
&
0x80
);
update_key_state
(
keystate
,
VK_LWIN
,
keystate
[
VK_LWIN
]
&
0x80
);
update_key_state
(
keystate
,
VK_RWIN
,
keystate
[
VK_RWIN
]
&
0x80
);
set_async_key_state
(
keystate
);
}
...
...
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