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
10aaff92
Commit
10aaff92
authored
Jul 12, 2023
by
Eric Pouech
Committed by
Alexandre Julliard
Jul 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conhost: Fix ctrl-c handling.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55197
Signed-off-by:
Eric Pouech
<
epouech@codeweavers.com
>
parent
cb33d402
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
conhost.c
programs/conhost/conhost.c
+15
-12
No files found.
programs/conhost/conhost.c
View file @
10aaff92
...
...
@@ -1502,22 +1502,16 @@ NTSTATUS write_console_input( struct console *console, const INPUT_RECORD *recor
console
->
records
=
new_rec
;
console
->
record_size
=
console
->
record_size
*
2
+
count
;
}
memcpy
(
console
->
records
+
console
->
record_count
,
records
,
count
*
sizeof
(
INPUT_RECORD
)
);
if
(
console
->
mode
&
ENABLE_PROCESSED_INPUT
)
{
unsigned
int
i
=
0
;
while
(
i
<
count
)
unsigned
int
i
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
unsigned
int
event
;
if
(
map_to_ctrlevent
(
console
,
&
records
[
i
],
&
event
))
if
(
map_to_ctrlevent
(
console
,
&
records
[
i
],
&
event
))
{
if
(
i
!=
count
-
1
)
memcpy
(
&
console
->
records
[
console
->
record_count
+
i
],
&
console
->
records
[
console
->
record_count
+
i
+
1
],
(
count
-
i
-
1
)
*
sizeof
(
INPUT_RECORD
)
);
count
--
;
if
(
records
[
i
].
Event
.
KeyEvent
.
bKeyDown
)
{
struct
condrv_ctrl_event
ctrl_event
;
...
...
@@ -1527,13 +1521,17 @@ NTSTATUS write_console_input( struct console *console, const INPUT_RECORD *recor
ctrl_event
.
group_id
=
0
;
NtDeviceIoControlFile
(
console
->
server
,
NULL
,
NULL
,
NULL
,
&
io
,
IOCTL_CONDRV_CTRL_EVENT
,
&
ctrl_event
,
sizeof
(
ctrl_event
),
NULL
,
0
);
}
}
else
i
++
;
else
console
->
records
[
console
->
record_count
++
]
=
records
[
i
];
}
}
console
->
record_count
+=
count
;
else
{
memcpy
(
console
->
records
+
console
->
record_count
,
records
,
count
*
sizeof
(
INPUT_RECORD
)
);
console
->
record_count
+=
count
;
}
return
flush
?
process_console_input
(
console
)
:
STATUS_SUCCESS
;
}
...
...
@@ -1768,6 +1766,11 @@ static DWORD WINAPI tty_input( void *param )
switch
(
ch
)
{
case
3
:
/* end of text */
if
(
console
->
is_unix
&&
(
console
->
mode
&
ENABLE_PROCESSED_INPUT
))
{
key_press
(
console
,
ch
,
'C'
,
LEFT_CTRL_PRESSED
);
break
;
}
LeaveCriticalSection
(
&
console_section
);
goto
done
;
case
'\n'
:
...
...
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