mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-21 18:50:47 +03:00
Use XDG_ACTIVATION_TOKEN from environment variables by default
This commit is contained in:
parent
e7d28b96da
commit
2a6cd88b7a
1 changed files with 4 additions and 1 deletions
|
@ -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
|
// 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...
|
// when you have an actual window, that has the focus...
|
||||||
auto waylandApp = app.nativeInterface<QNativeInterface::QWaylandApplication>();
|
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;
|
QQuickView window;
|
||||||
window.setTitle("Activate main instance");
|
window.setTitle("Activate main instance");
|
||||||
window.setMaximumSize(QSize(100, 50));
|
window.setMaximumSize(QSize(100, 50));
|
||||||
|
|
Loading…
Reference in a new issue