[Bf-blender-cvs] [78634b1fd1f] master: Cleanup: minor edits to recent wayland/libdecor
Campbell Barton
noreply at git.blender.org
Wed Oct 12 08:25:13 CEST 2022
Commit: 78634b1fd1fb76f101cd36e05fc80d00cd4c6f07
Author: Campbell Barton
Date: Wed Oct 12 17:23:51 2022 +1100
Branches: master
https://developer.blender.org/rB78634b1fd1fb76f101cd36e05fc80d00cd4c6f07
Cleanup: minor edits to recent wayland/libdecor
Remove asserts committed by accident & simplify preprocessor checks.
===================================================================
M intern/ghost/intern/GHOST_SystemWayland.cpp
M intern/ghost/intern/GHOST_SystemWayland.h
===================================================================
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);
More information about the Bf-blender-cvs
mailing list