diff options
| author | 2025-05-08 12:42:39 -0400 | |
|---|---|---|
| committer | 2025-05-08 12:42:39 -0400 | |
| commit | 7d4434ea4ceb1fa5c75f372a73ac6dfe5cb05b1d (patch) | |
| tree | 925ec53f8983af9af049c9b25c26754996580335 | |
| 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>
| -rw-r--r-- | meson.build | 4 | ||||
| -rw-r--r-- | src/egl_common.c | 4 | ||||
| -rw-r--r-- | src/window_wayland.c | 10 | ||||
| -rw-r--r-- | subprojects/libalabaster.wrap | 2 | ||||
| -rw-r--r-- | subprojects/libnaunet.wrap | 2 |
5 files changed, 13 insertions, 9 deletions
diff --git a/meson.build b/meson.build index 677d0a5..0154e3e 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,7 @@ project('stela', 'c', version: '0.01', - default_options: ['warning_level=2', 'c_std=c99']) + meson_version: '>=0.63.0', + default_options: ['warning_level=2', 'c_std=c99'], + license: 'GPL-3.0-only') compiler = meson.get_compiler('c') cmake = import('cmake') 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; } diff --git a/subprojects/libalabaster.wrap b/subprojects/libalabaster.wrap index fe96079..6ab8612 100644 --- a/subprojects/libalabaster.wrap +++ b/subprojects/libalabaster.wrap @@ -1,4 +1,4 @@ [wrap-git] url = https://git.akon.city/libalabaster -revision = a5516233d66eb1552cf7fdfe03779b2bf896c82d +revision = 34a5e136b6c79092eee73857bbad25892fe8047a depth = 1 diff --git a/subprojects/libnaunet.wrap b/subprojects/libnaunet.wrap index 4700180..c6bd17a 100644 --- a/subprojects/libnaunet.wrap +++ b/subprojects/libnaunet.wrap @@ -1,4 +1,4 @@ [wrap-git] url = https://git.akon.city/libnaunet -revision = 23ec05f871f53b724dc6eb5e1c62d0245109c69d +revision = ef86574ec5d859727695da65f683f0774a3b4460 depth = 1 |