From 584ec61f93bd6d0fe8a26e383099518da78f2c0a Mon Sep 17 00:00:00 2001 From: Matthew Schwartz Date: Tue, 28 Apr 2026 12:05:33 -0700 Subject: [PATCH] main: prevent nested clients from escaping to host Wayland compositors This stops vkcube from defaulting to Wayland WSI when using gamescope nested on another Wayland compositor (like kwin_wayland). This way, vkcube will default to X11 WSI unless --expose-wayland is passed as a gamescope argument. --- src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 1397028e7f..5a1f9acc3d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1028,6 +1028,9 @@ int main(int argc, char **argv) setenv("GAMESCOPE_WAYLAND_DISPLAY", wlserver_get_wl_display_name(), 1); if ( g_bExposeWayland ) setenv("WAYLAND_DISPLAY", wlserver_get_wl_display_name(), 1); + else + // Empty so libwayland's wayland-0 fallback doesn't escape to the parent compositor. + setenv("WAYLAND_DISPLAY", "", 1); #if HAVE_PIPEWIRE if ( !init_pipewire() )