From b36f7ef99e01cadbcc46271f6fa4acc9dc930892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 10 Oct 2012 11:41:21 -0400 Subject: [PATCH] terminal: Don't snap resize if we're maximized We allow fullscreen to fill the requested size, do the same for maximize. --- clients/terminal.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clients/terminal.c b/clients/terminal.c index a0d6db3e..4718a40b 100644 --- a/clients/terminal.c +++ b/clients/terminal.c @@ -763,7 +763,8 @@ resize_handler(struct widget *widget, columns = (width - m) / (int32_t) terminal->extents.max_x_advance; rows = (height - m) / (int32_t) terminal->extents.height; - if (window_is_fullscreen(terminal->window)) { + if (!window_is_fullscreen(terminal->window) && + !window_is_maximized(terminal->window)) { width = columns * terminal->extents.max_x_advance + m; height = rows * terminal->extents.height + m; widget_set_size(terminal->widget, width, height); @@ -777,7 +778,8 @@ terminal_resize(struct terminal *terminal, int columns, int rows) { int32_t width, height, m; - if (window_is_fullscreen(terminal->window)) + if (window_is_fullscreen(terminal->window) || + window_is_maximized(terminal->window)) return; m = 2 * terminal->margin;