wineconsole: Apply the new background colour to the visible screen buffer.
authorHugh McMaster <hugh.mcmaster@outlook.com>
Mon, 25 Jan 2016 10:01:00 +0000 (21:01 +1100)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 26 Jan 2016 14:28:32 +0000 (23:28 +0900)
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
programs/wineconsole/wineconsole.c

index 729416fe49882b828c8834c3ad806961ad3d2e20..f9027a49c07dcf100cd3aee76b8cc98f3477ca3b 100644 (file)
@@ -441,7 +441,12 @@ void     WINECON_SetConfig(struct inner_data* data, const struct config_data* cf
     }
     if (data->curcfg.def_attr != cfg->def_attr)
     {
+        DWORD screen_size, written;
+        COORD top_left = {0,0};
+
         data->curcfg.def_attr = cfg->def_attr;
+        screen_size = cfg->win_width * (cfg->win_height + 1);
+        FillConsoleOutputAttribute(data->hConOut, cfg->def_attr, screen_size, top_left, &written);
         SetConsoleTextAttribute(data->hConOut, cfg->def_attr);
     }
     /* now let's look at the window / sb size changes...