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
fc408f3d
Commit
fc408f3d
authored
Sep 21, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conhost: Force using relative cursor positioning in update_read_output.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
aecf53d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
conhost.c
programs/conhost/conhost.c
+31
-1
No files found.
programs/conhost/conhost.c
View file @
fc408f3d
...
...
@@ -309,6 +309,27 @@ static void set_tty_cursor( struct console *console, unsigned int x, unsigned in
tty_write
(
console
,
buf
,
strlen
(
buf
)
);
}
static
void
set_tty_cursor_relative
(
struct
console
*
console
,
unsigned
int
x
,
unsigned
int
y
)
{
if
(
y
<
console
->
tty_cursor_y
)
{
char
buf
[
64
];
sprintf
(
buf
,
"
\x1b
[%uA"
,
console
->
tty_cursor_y
-
y
);
tty_write
(
console
,
buf
,
strlen
(
buf
)
);
console
->
tty_cursor_y
=
y
;
}
else
{
while
(
console
->
tty_cursor_y
<
y
)
{
console
->
tty_cursor_x
=
0
;
console
->
tty_cursor_y
++
;
tty_write
(
console
,
"
\r\n
"
,
2
);
}
}
set_tty_cursor
(
console
,
x
,
y
);
}
static
void
set_tty_attr
(
struct
console
*
console
,
unsigned
int
attr
)
{
char
buf
[
8
];
...
...
@@ -1216,7 +1237,16 @@ static void update_read_output( struct console *console )
}
}
update_output
(
screen_buffer
,
&
update_rect
);
/* always try to use relative cursor positions in UNIX mode so that it works even if cursor
* position is out of sync */
if
(
update_rect
.
left
<=
update_rect
.
right
&&
update_rect
.
top
<=
update_rect
.
bottom
)
{
if
(
console
->
is_unix
)
set_tty_cursor_relative
(
screen_buffer
->
console
,
update_rect
.
left
,
update_rect
.
top
);
update_output
(
screen_buffer
,
&
update_rect
);
}
if
(
console
->
is_unix
)
set_tty_cursor_relative
(
screen_buffer
->
console
,
screen_buffer
->
cursor_x
,
screen_buffer
->
cursor_y
);
tty_sync
(
screen_buffer
->
console
);
}
...
...
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