Commit 8ac323f6 authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

wineconsole: Send the largest console window size information to the server.

parent 467981c2
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment