Module: wine Branch: master Commit: 8ac323f61b1406cc1581df27d009e41dc46630a2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8ac323f61b1406cc1581df27d0...
Author: Hugh McMaster hugh.mcmaster@outlook.com Date: Tue Jan 5 18:59:31 2016 +1100
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
---
programs/wineconsole/wineconsole.c | 6 +++++- server/console.c | 7 ------- 2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c index 7a89eeb..729416f 100644 --- a/programs/wineconsole/wineconsole.c +++ b/programs/wineconsole/wineconsole.c @@ -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 ); diff --git a/server/console.c b/server/console.c index a57b2fe..9b01614 100644 --- a/server/console.c +++ b/server/console.c @@ -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; }