From ab0704e682c8b394edbec55c2b7b83d1601f7da8 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 00:20:50 -0500 Subject: [PATCH] Don't pass LD_PRELOAD on to launched apps The wrapper preloads gtk4-layer-shell for the grid, but apps started from it inherited that, which broke GTK 3 apps like LibreWolf with "gdk_display_manager_get() was called before gtk_init()". --- grid.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/grid.js b/grid.js index 83156cb..a81b181 100644 --- a/grid.js +++ b/grid.js @@ -5,6 +5,10 @@ import GLib from "gi://GLib" import Gtk from "gi://Gtk?version=4.0" import LayerShell from "gi://Gtk4LayerShell" +// The wrapper preloads gtk4-layer-shell, which is only needed for this process. Apps launched from +// here would inherit it, and it breaks GTK 3 apps like Firefox. +GLib.unsetenv("LD_PRELOAD") + // Keep in sync with the overview section in the niri config. const ZOOM = 0.25 const WORKSPACE_ANCHOR = 0.15