aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-01-02 16:25:41 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-01-02 16:25:41 +0000
commit4a9f359a6a13c058e9c76b44941d4435065faa51 (patch)
tree55027c724ee797c988de95798b32048c26d6e626
parentterm: add visually focused attribute to terminal struct (diff)
wayland: ignore early configure calls
At this point, not everything has been setup and we crash when trying to convert the surface pointer to a terminal pointer.
-rw-r--r--wayland.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/wayland.c b/wayland.c
index 80300aba..e13e6b0b 100644
--- a/wayland.c
+++ b/wayland.c
@@ -411,6 +411,9 @@ xdg_toplevel_configure(void *data, struct xdg_toplevel *xdg_toplevel,
{
LOG_DBG("xdg-toplevel: configure: %dx%d", width, height);
+ if (width == 0 && height == 0)
+ return;
+
struct wayland *wayl = data;
struct terminal *term = wayl_terminal_from_xdg_toplevel(wayl, xdg_toplevel);
@@ -423,9 +426,7 @@ xdg_toplevel_configure(void *data, struct xdg_toplevel *xdg_toplevel,
}
term->visual_focus = is_focused;
-
- if (width >= 0 && height >= 0)
- render_resize(term, width, height);
+ render_resize(term, width, height);
}
static void