diff options
author | Campbell Barton <campbell@blender.org> | 2022-10-12 09:23:51 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-10-12 09:23:51 +0300 |
commit | 78634b1fd1fb76f101cd36e05fc80d00cd4c6f07 (patch) | |
tree | 6be629c7a647acb10890ee3618a094f7002e2519 | |
parent | f0e1089a33f4054998c96a50b92503251a47aa97 (diff) |
Cleanup: minor edits to recent wayland/libdecor
Remove asserts committed by accident & simplify preprocessor checks.
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWayland.cpp | 14 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWayland.h | 2 |
2 files changed, 5 insertions, 11 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp index 44b20ae2aef..250c7a48899 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cpp +++ b/intern/ghost/intern/GHOST_SystemWayland.cpp @@ -125,7 +125,9 @@ static bool use_gnome_confine_hack = false; * This is a hack because it seems there is no way to check if the compositor supports * server side decorations when initializing WAYLAND. */ -#define USE_GNOME_NEEDS_LIBDECOR_HACK +#if defined(WITH_GHOST_WAYLAND_LIBDECOR) && defined(WITH_GHOST_X11) +# define USE_GNOME_NEEDS_LIBDECOR_HACK +#endif /** \} */ @@ -3094,16 +3096,12 @@ static void global_handle_add(void *data, found = false; #ifdef USE_GNOME_NEEDS_LIBDECOR_HACK -# ifdef WITH_GHOST_X11 -# ifdef WITH_GHOST_WAYLAND_LIBDECOR if (STRPREFIX(interface, "gtk_shell")) { /* `gtk_shell1` at time of writing. */ - /* Only require libdecor when built with X11 support, + /* Only require `libdecor` when built with X11 support, * otherwise there is nothing to fall back on. */ display->libdecor_required = true; } -# endif /* WITH_GHOST_WAYLAND_LIBDECOR */ -# endif /* WITH_GHOST_X11 */ -#endif /* USE_GNOME_NEEDS_LIBDECOR_HACK */ +#endif } CLOG_INFO(LOG, @@ -4141,8 +4139,6 @@ wl_compositor *GHOST_SystemWayland::compositor() libdecor *GHOST_SystemWayland::libdecor_context() { - GHOST_ASSERT(use_libdecor, "X"); - GHOST_ASSERT(d->libdecor != nullptr, "X"); return d->libdecor->context; } diff --git a/intern/ghost/intern/GHOST_SystemWayland.h b/intern/ghost/intern/GHOST_SystemWayland.h index 864dee72b0c..7d19a5cf8b9 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.h +++ b/intern/ghost/intern/GHOST_SystemWayland.h @@ -27,8 +27,6 @@ class GHOST_WindowWayland; -struct GWL_Display; - bool ghost_wl_output_own(const struct wl_output *wl_output); void ghost_wl_output_tag(struct wl_output *wl_output); struct GWL_Output *ghost_wl_output_user_data(struct wl_output *wl_output); |