guard wlr_xwayland_create behind USE_XWAYLAND: no XWayland server spawned in pure Wayland build, fixes crash after conditional compilation

This commit is contained in:
Window Maker 2026-06-05 20:01:06 +02:00
parent 31b621bbd2
commit 210d320887
1 changed files with 5 additions and 5 deletions

View File

@ -872,13 +872,13 @@ wl_display_open(const char *name)
wl_signal_add(&wl_state.xdg_shell->events.new_toplevel,
&wl_state.xdg_new_surface_listener);
/* Path 1: XWayland bridge — start Xwayland eagerly (lazy=false) so that
* the compositor can open a Display* from its socket and pass it back to
* main.c. WindowMaker's own X11 UI (title bars, root menus, dock) then
* renders through XWayland, making the WM visible on-screen.
* The ready signal fires once Xwayland's socket accepts connections. */
#ifdef USE_XWAYLAND
/* Create XWayland server for X11 client support */
wl_state.xwayland = wlr_xwayland_create(wl_state.display,
wl_state.compositor, false);
#else
wl_state.xwayland = NULL;
#endif
#ifdef USE_XWAYLAND
if (wl_state.xwayland) {
if (wl_state.xwayland->server) {