wineconsole: Send the largest console window size information to the server.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
467981c29b
commit
8ac323f61b
|
@ -424,11 +424,15 @@ void WINECON_SetConfig(struct inner_data* data, const struct config_data* cf
|
|||
if (strcmpiW(data->curcfg.face_name, cfg->face_name) || data->curcfg.cell_width != cfg->cell_width ||
|
||||
data->curcfg.cell_height != cfg->cell_height || data->curcfg.font_weight != cfg->font_weight)
|
||||
{
|
||||
RECT r;
|
||||
data->fnSetFont(data, cfg->face_name, cfg->cell_height, cfg->font_weight);
|
||||
SystemParametersInfoW(SPI_GETWORKAREA, 0, &r, 0);
|
||||
SERVER_START_REQ(set_console_output_info)
|
||||
{
|
||||
req->handle = wine_server_obj_handle( data->hConOut );
|
||||
req->mask = SET_CONSOLE_OUTPUT_INFO_FONT;
|
||||
req->mask = SET_CONSOLE_OUTPUT_INFO_MAX_SIZE | SET_CONSOLE_OUTPUT_INFO_FONT;
|
||||
req->max_width = (r.right - r.left) / cfg->cell_width;
|
||||
req->max_height = (r.bottom - r.top - GetSystemMetrics(SM_CYCAPTION)) / cfg->cell_height;
|
||||
req->font_width = cfg->cell_width;
|
||||
req->font_height = cfg->cell_height;
|
||||
wine_server_call( req );
|
||||
|
|
|
@ -1018,13 +1018,6 @@ static int set_console_output_info( struct screen_buffer *screen_buffer,
|
|||
}
|
||||
if (req->mask & SET_CONSOLE_OUTPUT_INFO_MAX_SIZE)
|
||||
{
|
||||
/* can only be done by renderer */
|
||||
if (current->process->console != screen_buffer->input)
|
||||
{
|
||||
set_error( STATUS_INVALID_PARAMETER );
|
||||
return 0;
|
||||
}
|
||||
|
||||
screen_buffer->max_width = req->max_width;
|
||||
screen_buffer->max_height = req->max_height;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue