aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2019-06-16 16:03:52 +0000
committerGitHub <noreply@github.com>2019-06-16 16:03:52 +0000
commitfe4cfdc545fb83b5c5e880cc24c65f4c773be8a0 (patch)
treec01653b2dd3468e6606d46508bc4bf0845d0c639
parentcc3e4d3d5cb2f658d6faef02e4216b9342451efc (diff)
downloadalacritty-fe4cfdc545fb83b5c5e880cc24c65f4c773be8a0.tar.gz
alacritty-fe4cfdc545fb83b5c5e880cc24c65f4c773be8a0.zip
Unset DESKTOP_STARTUP_ID environment variable
This unsets the DESKTOP_STARTUP_ID environment variable at startup, to prevent child processes from inheriting it. This solves problems with child windows not properly spawning in the foreground with KDE. More information can be found here: https://specifications.freedesktop.org/startup-notification-spec/startup-notification-latest.txt
-rw-r--r--CHANGELOG.md6
-rw-r--r--alacritty_terminal/src/tty/mod.rs3
2 files changed, 9 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 137b19f7..08c7e774 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [Unreleased]
+
+### Fixed
+
+- GUI programs launched by Alacritty starting in the background on X11
+
## 0.3.3
### Packaging
diff --git a/alacritty_terminal/src/tty/mod.rs b/alacritty_terminal/src/tty/mod.rs
index c0ac7a31..16ae96ce 100644
--- a/alacritty_terminal/src/tty/mod.rs
+++ b/alacritty_terminal/src/tty/mod.rs
@@ -89,6 +89,9 @@ pub fn setup_env(config: &Config) {
// Advertise 24-bit color support
env::set_var("COLORTERM", "truecolor");
+ // Prevent child processes from inheriting startup notification env
+ env::remove_var("DESKTOP_STARTUP_ID");
+
// Set env vars from config
for (key, value) in config.env.iter() {
env::set_var(key, value);