diff options
author | Campbell Barton <campbell@blender.org> | 2022-10-11 03:07:03 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-10-11 03:14:40 +0300 |
commit | b51d337adc135ab3358fc562f70712a07a58ef52 (patch) | |
tree | ff8bda305ba5abd7d3b9a5ae4b2bcc32ac7ad501 /intern/ghost | |
parent | f495939e6e2cf8fdbc6055f5f98445a06ce31203 (diff) |
GHOST/Wayland: print all dynamic loading failure when using Wayland
Previously only failure to dynamically load libdecor would report a
warning. Now report failure to load all Wayland libraries.
This was done because Wayland libraries (besides libdecor) are likely to
be installed on systems running Wayland. However it makes it difficult
to troubleshoot failure to load Wayland on systems with libdecor.
Only silence Wayland dynamic loading warnings when Wayland isn't running.
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWayland.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp index 7feb6713d03..7e56ed0affb 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cpp +++ b/intern/ghost/intern/GHOST_SystemWayland.cpp @@ -4320,20 +4320,13 @@ bool GHOST_SystemWayland::window_cursor_grab_set(const GHOST_TGrabCursorMode mod #ifdef WITH_GHOST_WAYLAND_DYNLOAD bool ghost_wl_dynload_libraries() { - /* Only report when `libwayland-client` is not found when building without X11, - * which will be used as a fallback. */ # ifdef WITH_GHOST_X11 - bool verbose = false; -# ifdef WITH_GHOST_WAYLAND_LIBDECOR - /* When running in Wayland, let the user know if libdecor is the only reason WAYLAND - * could not be used. Otherwise it's not obvious why X11 is used as a fallback. */ - bool verbose_libdecor = getenv("WAYLAND_DISPLAY") != nullptr; -# endif + /* When running in WAYLAND, let the user know when a missing library is the only reason + * WAYLAND could not be used. Otherwise it's not obvious why X11 is used as a fallback. + * Otherwise when X11 is used, reporting WAYLAND library warnings is unwelcome noise. */ + bool verbose = getenv("WAYLAND_DISPLAY") != nullptr; # else bool verbose = true; -# ifdef WITH_GHOST_WAYLAND_LIBDECOR - bool verbose_libdecor = true; -# endif # endif /* !WITH_GHOST_X11 */ # ifdef WITH_GHOST_WAYLAND_LIBDECOR @@ -4344,7 +4337,7 @@ bool ghost_wl_dynload_libraries() wayland_dynload_cursor_init(verbose) && /* `libwayland-cursor`. */ wayland_dynload_egl_init(verbose) && /* `libwayland-egl`. */ # ifdef WITH_GHOST_WAYLAND_LIBDECOR - (libdecor_init = wayland_dynload_libdecor_init(verbose_libdecor)) && /* `libdecor-0`. */ + (libdecor_init = wayland_dynload_libdecor_init(verbose)) && /* `libdecor-0`. */ # endif true) { return true; |