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
0c25f5ee
Commit
0c25f5ee
authored
Oct 06, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conhost: Use better default values in create_screen_buffer.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f377ac1f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
5 deletions
+37
-5
console.c
dlls/kernel32/tests/console.c
+21
-0
conhost.c
programs/conhost/conhost.c
+16
-5
No files found.
dlls/kernel32/tests/console.c
View file @
0c25f5ee
...
...
@@ -3950,6 +3950,8 @@ static void test_AllocConsole(void)
static
void
test_pseudo_console_child
(
HANDLE
input
,
HANDLE
output
)
{
CONSOLE_SCREEN_BUFFER_INFO
sb_info
;
CONSOLE_CURSOR_INFO
cursor_info
;
DWORD
mode
;
BOOL
ret
;
...
...
@@ -3985,6 +3987,25 @@ static void test_pseudo_console_child(HANDLE input, HANDLE output)
ret
=
SetConsoleMode
(
output
,
mode
|
ENABLE_WRAP_AT_EOL_OUTPUT
);
ok
(
ret
,
"SetConsoleMode failed: %u
\n
"
,
GetLastError
());
ret
=
GetConsoleScreenBufferInfo
(
output
,
&
sb_info
);
ok
(
ret
,
"GetConsoleScreenBufferInfo failed: %u
\n
"
,
GetLastError
());
ok
(
sb_info
.
dwSize
.
X
==
40
,
"dwSize.X = %u
\n
"
,
sb_info
.
dwSize
.
X
);
ok
(
sb_info
.
dwSize
.
Y
==
30
,
"dwSize.Y = %u
\n
"
,
sb_info
.
dwSize
.
Y
);
ok
(
sb_info
.
dwCursorPosition
.
X
==
0
,
"dwCursorPosition.X = %u
\n
"
,
sb_info
.
dwCursorPosition
.
X
);
ok
(
sb_info
.
dwCursorPosition
.
Y
==
0
,
"dwCursorPosition.Y = %u
\n
"
,
sb_info
.
dwCursorPosition
.
Y
);
ok
(
sb_info
.
wAttributes
==
7
,
"wAttributes = %x
\n
"
,
sb_info
.
wAttributes
);
ok
(
sb_info
.
srWindow
.
Left
==
0
,
"srWindow.Left = %u
\n
"
,
sb_info
.
srWindow
.
Left
);
ok
(
sb_info
.
srWindow
.
Top
==
0
,
"srWindow.Top = %u
\n
"
,
sb_info
.
srWindow
.
Top
);
ok
(
sb_info
.
srWindow
.
Right
==
39
,
"srWindow.Right = %u
\n
"
,
sb_info
.
srWindow
.
Right
);
ok
(
sb_info
.
srWindow
.
Bottom
==
29
,
"srWindow.Bottom = %u
\n
"
,
sb_info
.
srWindow
.
Bottom
);
ok
(
sb_info
.
dwMaximumWindowSize
.
X
==
40
,
"dwMaximumWindowSize.X = %u
\n
"
,
sb_info
.
dwMaximumWindowSize
.
X
);
ok
(
sb_info
.
dwMaximumWindowSize
.
Y
==
30
,
"dwMaximumWindowSize.Y = %u
\n
"
,
sb_info
.
dwMaximumWindowSize
.
Y
);
ret
=
GetConsoleCursorInfo
(
output
,
&
cursor_info
);
ok
(
ret
,
"GetConsoleCursorInfo failed: %u
\n
"
,
GetLastError
());
ok
(
cursor_info
.
dwSize
==
25
,
"dwSize = %u
\n
"
,
cursor_info
.
dwSize
);
ok
(
cursor_info
.
bVisible
==
TRUE
,
"bVisible = %x
\n
"
,
cursor_info
.
bVisible
);
test_console_title
();
test_WriteConsoleInputW
(
input
);
}
...
...
programs/conhost/conhost.c
View file @
0c25f5ee
...
...
@@ -184,19 +184,30 @@ static struct screen_buffer *create_screen_buffer( struct console *console, int
screen_buffer
->
console
=
console
;
screen_buffer
->
id
=
id
;
screen_buffer
->
mode
=
ENABLE_PROCESSED_OUTPUT
|
ENABLE_WRAP_AT_EOL_OUTPUT
;
screen_buffer
->
cursor_size
=
100
;
screen_buffer
->
cursor_size
=
25
;
screen_buffer
->
cursor_visible
=
1
;
screen_buffer
->
width
=
width
;
screen_buffer
->
height
=
height
;
screen_buffer
->
attr
=
0x07
;
screen_buffer
->
popup_attr
=
0xf5
;
screen_buffer
->
max_width
=
80
;
screen_buffer
->
max_height
=
25
;
screen_buffer
->
win
.
right
=
min
(
screen_buffer
->
max_width
-
1
,
width
-
1
);
screen_buffer
->
win
.
bottom
=
min
(
screen_buffer
->
max_height
-
1
,
height
-
1
);
screen_buffer
->
font
.
weight
=
FW_NORMAL
;
screen_buffer
->
font
.
pitch_family
=
FIXED_PITCH
|
FF_DONTCARE
;
if
(
console
->
active
)
{
screen_buffer
->
max_width
=
console
->
active
->
max_width
;
screen_buffer
->
max_height
=
console
->
active
->
max_height
;
screen_buffer
->
win
.
right
=
console
->
active
->
win
.
right
-
console
->
active
->
win
.
left
;
screen_buffer
->
win
.
bottom
=
console
->
active
->
win
.
bottom
-
console
->
active
->
win
.
top
;
}
else
{
screen_buffer
->
max_width
=
width
;
screen_buffer
->
max_height
=
height
;
screen_buffer
->
win
.
right
=
width
-
1
;
screen_buffer
->
win
.
bottom
=
height
-
1
;
}
if
(
wine_rb_put
(
&
screen_buffer_map
,
LongToPtr
(
id
),
&
screen_buffer
->
entry
))
{
free
(
screen_buffer
);
...
...
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