fix(snap): allow portal override
cx
This commit is contained in:
1 parent
dd11e81a07
commit
de93411de0
2 files changed
+5
-2
No files matched your search
@@ -54,6 +54,7 @@ apps:
|
||||
# Prefer GNOME platform GL libs to avoid Mesa/driver mismatches on NVIDIA.
|
||||
LD_LIBRARY_PATH: $SNAP/gnome-platform/usr/lib/x86_64-linux-gnu:$SNAP/gnome-platform/lib/x86_64-linux-gnu:$SNAP/gnome-platform/usr/lib:$SNAP/gnome-platform/lib:$LD_LIBRARY_PATH
|
||||
WEBKIT_EXEC_PATH: $SNAP/usr/lib/x86_64-linux-gnu/webkit2gtk-4.1
|
||||
GTK_USE_PORTAL: "0"
|
||||
plugs:
|
||||
- network
|
||||
- audio-playback
|
||||
|
||||
@@ -32,10 +32,12 @@ fn main() {
|
||||
// This is set before any GTK initialization
|
||||
}
|
||||
|
||||
// Use xdg-desktop-portal for file dialogs on Linux
|
||||
// This makes GTK apps use native file pickers (e.g., KDE's on Plasma)
|
||||
// Use xdg-desktop-portal for file dialogs on Linux.
|
||||
// Honor explicit overrides (e.g., sandboxed environments).
|
||||
#[cfg(target_os = "linux")]
|
||||
if std::env::var_os("GTK_USE_PORTAL").is_none() {
|
||||
std::env::set_var("GTK_USE_PORTAL", "1");
|
||||
}
|
||||
|
||||
// Prefer a writable TMPDIR to avoid GTK pixbuf cache crashes on some systems.
|
||||
#[cfg(target_os = "linux")]
|
||||
|
||||
Reference in new issue
Block a user