Skip to content

Commit

Permalink
Wayland: Add environment variable to disable libdecor loading
Browse files Browse the repository at this point in the history
Libdecor has some quirks and depending on the setup it might be useful
to switch to the xdg-shell branch. Recompiling the whole engine without
libdecor is not an acceptable way to do that.
  • Loading branch information
Riteo committed Sep 10, 2024
1 parent 97ef3c8 commit 53e1492
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions platform/linuxbsd/wayland/wayland_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3739,10 +3739,16 @@ Error WaylandThread::init() {
}
#endif // SOWRAP_ENABLED

if (libdecor_found) {
libdecor_context = libdecor_new(wl_display, (struct libdecor_interface *)&libdecor_interface);
bool skip_libdecor = OS::get_singleton()->has_environment("GODOT_WAYLAND_DISABLE_LIBDECOR");

if (skip_libdecor) {
print_verbose("Skipping libdecor check because GODOT_WAYLAND_DISABLE_LIBDECOR is set.");
} else {
print_verbose("libdecor not found. Client-side decorations disabled.");
if (libdecor_found) {
libdecor_context = libdecor_new(wl_display, (struct libdecor_interface *)&libdecor_interface);
} else {
print_verbose("libdecor not found. Client-side decorations disabled.");
}
}
#endif // LIBDECOR_ENABLED

Expand Down

0 comments on commit 53e1492

Please sign in to comment.