mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 06:06:13 +00:00
conhost: Copy Character Attributes (colors) to the new screen buffer.
CreateConsoleScreenBuffer() copies the Character Attributes (colors) to the new screen buffer when called. Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5ee5d7bbf3
commit
b17eb27112
2 changed files with 5 additions and 4 deletions
|
@ -1047,7 +1047,7 @@ static void test_new_screen_buffer_color_attributes(HANDLE hConOut)
|
|||
ok(ret, "GetConsoleScreenBufferInfoEx failed: error %u\n", GetLastError());
|
||||
CloseHandle(hConOut2);
|
||||
|
||||
todo_wine ok(csbi2.wAttributes == orig_attr, "Character Attributes should have been copied: "
|
||||
ok(csbi2.wAttributes == orig_attr, "Character Attributes should have been copied: "
|
||||
"got %#x, expected %#x\n", csbi2.wAttributes, orig_attr);
|
||||
todo_wine ok(csbi2.wPopupAttributes != orig_popup, "Popup Attributes should not match original value\n");
|
||||
todo_wine ok(csbi2.wPopupAttributes == orig_attr, "Popup Attributes should match Character Attributes\n");
|
||||
|
@ -1068,7 +1068,7 @@ static void test_new_screen_buffer_color_attributes(HANDLE hConOut)
|
|||
ok(ret, "GetConsoleScreenBufferInfoEx failed: error %u\n", GetLastError());
|
||||
CloseHandle(hConOut2);
|
||||
|
||||
todo_wine ok(csbi2.wAttributes == attr, "Character Attributes should have been copied: "
|
||||
ok(csbi2.wAttributes == attr, "Character Attributes should have been copied: "
|
||||
"got %#x, expected %#x\n", csbi2.wAttributes, attr);
|
||||
todo_wine ok(csbi2.wPopupAttributes != orig_popup, "Popup Attributes should not match original value\n");
|
||||
todo_wine ok(csbi2.wPopupAttributes == attr, "Popup Attributes should match Character Attributes\n");
|
||||
|
@ -1092,7 +1092,7 @@ static void test_new_screen_buffer_color_attributes(HANDLE hConOut)
|
|||
ok(ret, "GetConsoleScreenBufferInfoEx failed: error %u\n", GetLastError());
|
||||
CloseHandle(hConOut2);
|
||||
|
||||
todo_wine ok(csbi2.wAttributes == orig_attr, "Character Attributes should have been copied: "
|
||||
ok(csbi2.wAttributes == orig_attr, "Character Attributes should have been copied: "
|
||||
"got %#x, expected %#x\n", csbi2.wAttributes, orig_attr);
|
||||
todo_wine ok(csbi2.wPopupAttributes != orig_popup, "Popup Attributes should not match original value\n");
|
||||
todo_wine ok(csbi2.wPopupAttributes == orig_attr, "Popup Attributes should match Character Attributes\n");
|
||||
|
|
|
@ -85,7 +85,6 @@ static struct screen_buffer *create_screen_buffer( struct console *console, int
|
|||
screen_buffer->cursor_visible = 1;
|
||||
screen_buffer->width = width;
|
||||
screen_buffer->height = height;
|
||||
screen_buffer->attr = 0x07;
|
||||
screen_buffer->popup_attr = 0xf5;
|
||||
screen_buffer->font.weight = FW_NORMAL;
|
||||
screen_buffer->font.pitch_family = FIXED_PITCH | FF_DONTCARE;
|
||||
|
@ -96,6 +95,7 @@ static struct screen_buffer *create_screen_buffer( struct console *console, int
|
|||
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;
|
||||
screen_buffer->attr = console->active->attr;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -103,6 +103,7 @@ static struct screen_buffer *create_screen_buffer( struct console *console, int
|
|||
screen_buffer->max_height = height;
|
||||
screen_buffer->win.right = width - 1;
|
||||
screen_buffer->win.bottom = height - 1;
|
||||
screen_buffer->attr = FOREGROUND_BLUE|FOREGROUND_GREEN|FOREGROUND_RED;
|
||||
}
|
||||
|
||||
if (wine_rb_put( &screen_buffer_map, LongToPtr(id), &screen_buffer->entry ))
|
||||
|
|
Loading…
Reference in a new issue