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
3a6da8de
Commit
3a6da8de
authored
Oct 08, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conhost: Support painting screen buffer.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c2ffbe5d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
2 deletions
+37
-2
conhost.c
programs/conhost/conhost.c
+10
-2
conhost.h
programs/conhost/conhost.h
+1
-0
window.c
programs/conhost/window.c
+26
-0
No files found.
programs/conhost/conhost.c
View file @
3a6da8de
...
...
@@ -318,10 +318,18 @@ static void update_output( struct screen_buffer *screen_buffer, RECT *rect )
char_info_t
*
ch
;
char
buf
[
8
];
if
(
!
is_active
(
screen_buffer
)
||
!
screen_buffer
->
console
->
tty_output
)
return
;
if
(
rect
->
top
>
rect
->
bottom
||
rect
->
right
<
rect
->
left
)
return
;
if
(
!
is_active
(
screen_buffer
)
||
rect
->
top
>
rect
->
bottom
||
rect
->
right
<
rect
->
left
)
return
;
TRACE
(
"%s
\n
"
,
wine_dbgstr_rect
(
rect
));
if
(
screen_buffer
->
console
->
win
)
{
update_window_region
(
screen_buffer
->
console
,
rect
);
return
;
}
if
(
!
screen_buffer
->
console
->
tty_output
)
return
;
hide_tty_cursor
(
screen_buffer
->
console
);
for
(
y
=
rect
->
top
;
y
<=
rect
->
bottom
;
y
++
)
...
...
programs/conhost/conhost.h
View file @
3a6da8de
...
...
@@ -131,6 +131,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
);
NTSTATUS
change_screen_buffer_size
(
struct
screen_buffer
*
screen_buffer
,
int
new_width
,
int
new_height
);
...
...
programs/conhost/window.c
View file @
3a6da8de
...
...
@@ -933,6 +933,22 @@ static LRESULT WINAPI window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lp
update_window
(
console
);
break
;
case
WM_PAINT
:
{
PAINTSTRUCT
ps
;
BeginPaint
(
console
->
win
,
&
ps
);
BitBlt
(
ps
.
hdc
,
0
,
0
,
(
console
->
active
->
win
.
right
-
console
->
active
->
win
.
left
+
1
)
*
console
->
active
->
font
.
width
,
(
console
->
active
->
win
.
bottom
-
console
->
active
->
win
.
top
+
1
)
*
console
->
active
->
font
.
height
,
console
->
window
->
mem_dc
,
console
->
active
->
win
.
left
*
console
->
active
->
font
.
width
,
console
->
active
->
win
.
top
*
console
->
active
->
font
.
height
,
SRCCOPY
);
EndPaint
(
console
->
win
,
&
ps
);
break
;
}
default:
return
DefWindowProcW
(
hwnd
,
msg
,
wparam
,
lparam
);
}
...
...
@@ -947,6 +963,16 @@ void update_window_config( struct console *console )
PostMessageW
(
console
->
win
,
WM_UPDATE_CONFIG
,
0
,
0
);
}
void
update_window_region
(
struct
console
*
console
,
const
RECT
*
update
)
{
RECT
*
window_rect
=
&
console
->
window
->
update
;
window_rect
->
left
=
min
(
window_rect
->
left
,
update
->
left
);
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
);
}
BOOL
init_window
(
struct
console
*
console
)
{
struct
console_config
config
;
...
...
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