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()".
This commit is contained in:
Henry Hiles 2026-11-17 00:20:50 -05:00
commit ab0704e682
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -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