aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-02-25 19:29:44 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-02-25 19:29:44 +0000
commitef53729242596344f07b1e9329ffaad51252b0c3 (patch)
tree0d9b48f36af4fce174c0cfbb5c74de0fbde04c6d /render.c
parentwayland: mark the whole search surface as opaque (diff)
render: resize with with/height == 0 resizes to user configured dimensions
Diffstat (limited to 'render.c')
-rw-r--r--render.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/render.c b/render.c
index 460ffd74..54c9e993 100644
--- a/render.c
+++ b/render.c
@@ -1117,7 +1117,7 @@ render_search_box(struct terminal *term)
static bool
maybe_resize(struct terminal *term, int width, int height, bool force)
{
- if (!force && (width == 0 || height == 0))
+ if (term->cell_width == 0 && term->cell_height == 0)
return false;
int scale = -1;
@@ -1131,14 +1131,14 @@ maybe_resize(struct terminal *term, int width, int height, bool force)
scale = 1;
}
+ if (width == 0 && height == 0) {
+ width = term->conf->width;
+ height = term->conf->height;
+ }
+
width *= scale;
height *= scale;
- if (!force && width == 0 && height == 0) {
- /* Assume we're not fully up and running yet */
- return false;
- }
-
/* Scaled CSD border + title bar sizes */
const int csd_border = term->window->use_csd ? csd_border_size * scale : 0;
const int csd_title = term->window->use_csd ? csd_title_size * scale : 0;