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
8ccf24cc
Commit
8ccf24cc
authored
Mar 30, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 31, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conhost: Delay window refresh on output update.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
68f8c454
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
9 deletions
+16
-9
conhost.c
programs/conhost/conhost.c
+4
-4
conhost.h
programs/conhost/conhost.h
+1
-1
window.c
programs/conhost/window.c
+11
-4
No files found.
programs/conhost/conhost.c
View file @
8ccf24cc
...
...
@@ -1211,7 +1211,7 @@ static void update_read_output( struct console *console )
if
(
console
->
is_unix
)
set_tty_cursor_relative
(
screen_buffer
->
console
,
screen_buffer
->
cursor_x
,
screen_buffer
->
cursor_y
);
tty_sync
(
screen_buffer
->
console
);
update_window_config
(
screen_buffer
->
console
);
update_window_config
(
screen_buffer
->
console
,
TRUE
);
}
static
NTSTATUS
process_console_input
(
struct
console
*
console
)
...
...
@@ -1703,7 +1703,7 @@ static NTSTATUS screen_buffer_activate( struct screen_buffer *screen_buffer )
SetRect
(
&
update_rect
,
0
,
0
,
screen_buffer
->
width
-
1
,
screen_buffer
->
height
-
1
);
update_output
(
screen_buffer
,
&
update_rect
);
tty_sync
(
screen_buffer
->
console
);
update_window_config
(
screen_buffer
->
console
);
update_window_config
(
screen_buffer
->
console
,
FALSE
);
return
STATUS_SUCCESS
;
}
...
...
@@ -1896,7 +1896,7 @@ static NTSTATUS set_output_info( struct screen_buffer *screen_buffer,
if
(
is_active
(
screen_buffer
))
{
tty_sync
(
screen_buffer
->
console
);
update_window_config
(
screen_buffer
->
console
);
update_window_config
(
screen_buffer
->
console
,
FALSE
);
}
return
STATUS_SUCCESS
;
}
...
...
@@ -1955,7 +1955,7 @@ static NTSTATUS write_console( struct screen_buffer *screen_buffer, const WCHAR
scroll_to_cursor
(
screen_buffer
);
update_output
(
screen_buffer
,
&
update_rect
);
tty_sync
(
screen_buffer
->
console
);
update_window_config
(
screen_buffer
->
console
);
update_window_config
(
screen_buffer
->
console
,
TRUE
);
return
STATUS_SUCCESS
;
}
...
...
programs/conhost/conhost.h
View file @
8ccf24cc
...
...
@@ -132,7 +132,7 @@ struct screen_buffer
BOOL
init_window
(
struct
console
*
console
);
void
update_window_region
(
struct
console
*
console
,
const
RECT
*
update
);
void
update_window_config
(
struct
console
*
console
);
void
update_window_config
(
struct
console
*
console
,
BOOL
delay
);
NTSTATUS
write_console_input
(
struct
console
*
console
,
const
INPUT_RECORD
*
records
,
unsigned
int
count
,
BOOL
flush
);
...
...
programs/conhost/window.c
View file @
8ccf24cc
...
...
@@ -2170,8 +2170,10 @@ static LRESULT WINAPI window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lp
PostQuitMessage
(
0
);
break
;
case
WM_TIMER
:
case
WM_UPDATE_CONFIG
:
update_window
(
console
);
if
(
console
->
window
->
update_state
==
UPDATE_PENDING
)
update_window
(
console
);
break
;
case
WM_PAINT
:
...
...
@@ -2457,11 +2459,16 @@ static LRESULT WINAPI window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lp
return
0
;
}
void
update_window_config
(
struct
console
*
console
)
void
update_window_config
(
struct
console
*
console
,
BOOL
delay
)
{
const
int
delay_timeout
=
50
;
if
(
!
console
->
win
||
console
->
window
->
update_state
!=
UPDATE_NONE
)
return
;
console
->
window
->
update_state
=
UPDATE_PENDING
;
PostMessageW
(
console
->
win
,
WM_UPDATE_CONFIG
,
0
,
0
);
if
(
delay
)
SetTimer
(
console
->
win
,
1
,
delay_timeout
,
NULL
);
else
PostMessageW
(
console
->
win
,
WM_UPDATE_CONFIG
,
0
,
0
);
}
void
update_window_region
(
struct
console
*
console
,
const
RECT
*
update
)
...
...
@@ -2471,7 +2478,7 @@ void update_window_region( struct console *console, const RECT *update )
window_rect
->
top
=
min
(
window_rect
->
top
,
update
->
top
);
window_rect
->
right
=
max
(
window_rect
->
right
,
update
->
right
);
window_rect
->
bottom
=
max
(
window_rect
->
bottom
,
update
->
bottom
);
update_window_config
(
console
);
update_window_config
(
console
,
TRUE
);
}
BOOL
init_window
(
struct
console
*
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