diff options
author | DeepBlueV7.X <nicolas.werner@hotmail.de> | 2024-05-16 11:32:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-16 11:32:02 +0000 |
commit | f1f7f8e73074e5fa1fb3f45d7b8aae658687f011 (patch) | |
tree | e0be3e64e159f35ab1727912330a948ec2235f88 /src | |
parent | Don't show spoilers in sidebar or notifications if possible (diff) | |
parent | Use XDG_ACTIVATION_TOKEN from environment variables by default (diff) | |
download | nheko-f1f7f8e73074e5fa1fb3f45d7b8aae658687f011.tar.xz |
Merge pull request #1731 from q234rty/master
Use `XDG_ACTIVATION_TOKEN` from environment variables by default
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9d1872b9..15519b8a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -259,7 +259,10 @@ main(int argc, char *argv[]) // getting a valid activation token on wayland is a bit of a pain, it works most reliably // when you have an actual window, that has the focus... auto waylandApp = app.nativeInterface<QNativeInterface::QWaylandApplication>(); - if (waylandApp) { + // When the token is set in the env, use it by default as that's what we're supposed to do + // But leave a env knob so users can workaround terminal emulators that leak tokens + if (waylandApp && + (!qEnvironmentVariableIsEmpty("NHEKO_FORCE_ACTIVATION_SPLASH") || token.isEmpty())) { QQuickView window; window.setTitle("Activate main instance"); window.setMaximumSize(QSize(100, 50)); |