diff options
| author | 2025-05-08 12:42:39 -0400 | |
|---|---|---|
| committer | 2025-05-08 12:42:39 -0400 | |
| commit | 7d4434ea4ceb1fa5c75f372a73ac6dfe5cb05b1d (patch) | |
| tree | 925ec53f8983af9af049c9b25c26754996580335 /src | |
| parent | e2304d573cbfa5fe3076b0f702e384bcf7229695 (diff) | |
| download | stela-7d4434ea4ceb1fa5c75f372a73ac6dfe5cb05b1d.tar.gz stela-7d4434ea4ceb1fa5c75f372a73ac6dfe5cb05b1d.tar.bz2 stela-7d4434ea4ceb1fa5c75f372a73ac6dfe5cb05b1d.zip | |
Don't crash on Wayland without decoration manager
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'src')
| -rw-r--r-- | src/egl_common.c | 4 | ||||
| -rw-r--r-- | src/window_wayland.c | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/egl_common.c b/src/egl_common.c index d77e6cb..9bfc31f 100644 --- a/src/egl_common.c +++ b/src/egl_common.c @@ -44,9 +44,9 @@ bool stl_load_egl(struct stl_egl_global *global) log_error("Failed to load EGL (glad)."); return false; } - log_info("Using EGL (glad) version %s.", eglQueryString(global->display, EGL_VERSION)); + log_debug("Using EGL (glad) version %s.", eglQueryString(global->display, EGL_VERSION)); #else - log_info("Using EGL version %s.", eglQueryString(global->display, EGL_VERSION)); + log_debug("Using EGL version %s.", eglQueryString(global->display, EGL_VERSION)); #endif return true; diff --git a/src/window_wayland.c b/src/window_wayland.c index b9ac67d..7d37a11 100644 --- a/src/window_wayland.c +++ b/src/window_wayland.c @@ -896,10 +896,12 @@ static bool create_toplevel(struct stl_window_wayland *wl, s32 scale, const char xdg_toplevel_set_min_size(wl->xdg_toplevel, STELA_MIN_WIDTH, STELA_MIN_HEIGHT); xdg_surface_set_window_geometry(wl->xdg_surface, 0, 0, geom_width, geom_height); - u32 decor = ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE; - wl->zxdg_toplevel_decoration = zxdg_decoration_manager_v1_get_toplevel_decoration( - wl->zxdg_decoration_manager, wl->xdg_toplevel); - zxdg_toplevel_decoration_v1_set_mode(wl->zxdg_toplevel_decoration, decor); + if (wl->zxdg_decoration_manager) { + u32 decor = ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE; + wl->zxdg_toplevel_decoration = zxdg_decoration_manager_v1_get_toplevel_decoration( + wl->zxdg_decoration_manager, wl->xdg_toplevel); + zxdg_toplevel_decoration_v1_set_mode(wl->zxdg_toplevel_decoration, decor); + } return true; } |