aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
Diffstat (limited to 'render.c')
-rw-r--r--render.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/render.c b/render.c
index 4a006e10..2d15fb81 100644
--- a/render.c
+++ b/render.c
@@ -2070,9 +2070,9 @@ maybe_resize(struct terminal *term, int width, int height, bool force)
* If we have a "last" used size - use that. Otherwise, use
* the size from the user configuration.
*/
- if (term->unmaximized_width != 0 && term->unmaximized_height != 0) {
- width = term->unmaximized_width;
- height = term->unmaximized_height;
+ if (term->stashed_width != 0 && term->stashed_height != 0) {
+ width = term->stashed_width;
+ height = term->stashed_height;
} else {
switch (term->conf->size.type) {
case CONF_SIZE_PX:
@@ -2225,9 +2225,14 @@ maybe_resize(struct terminal *term, int width, int height, bool force)
term->render.last_cursor.row = NULL;
damage_view:
- if (!term->window->is_maximized && !term->window->is_fullscreen) {
- term->unmaximized_width = term->width;
- term->unmaximized_height = term->height;
+ if (!term->window->is_maximized &&
+ !term->window->is_fullscreen &&
+ !term->window->is_tiled)
+ {
+ /* Stash current size, to enable us to restore it when we're
+ * being un-maximized/fullscreened/tiled */
+ term->stashed_width = term->width;
+ term->stashed_height = term->height;
}
#if 0