mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-09 08:21:01 -04:00
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.
This commit is contained in:
parent
eb1ea2d80d
commit
4a9f359a6a
1 changed files with 4 additions and 3 deletions
|
|
@ -411,6 +411,9 @@ xdg_toplevel_configure(void *data, struct xdg_toplevel *xdg_toplevel,
|
||||||
{
|
{
|
||||||
LOG_DBG("xdg-toplevel: configure: %dx%d", width, height);
|
LOG_DBG("xdg-toplevel: configure: %dx%d", width, height);
|
||||||
|
|
||||||
|
if (width == 0 && height == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
struct wayland *wayl = data;
|
struct wayland *wayl = data;
|
||||||
struct terminal *term = wayl_terminal_from_xdg_toplevel(wayl, xdg_toplevel);
|
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;
|
term->visual_focus = is_focused;
|
||||||
|
render_resize(term, width, height);
|
||||||
if (width >= 0 && height >= 0)
|
|
||||||
render_resize(term, width, height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue