From 6c75bae88bd15d3aa80d51e8cc160e3e59a8bb64 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 6 Apr 2021 13:54:52 +0200 Subject: [PATCH] Warn when qputenv returns false as the whole component won't work --- src/interfaces/shell.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/interfaces/shell.cpp b/src/interfaces/shell.cpp index d9595e2..6eb490c 100644 --- a/src/interfaces/shell.cpp +++ b/src/interfaces/shell.cpp @@ -7,10 +7,14 @@ #include "shell.h" #include #include +#include using namespace LayerShellQt; void Shell::useLayerShell() { - qputenv("QT_WAYLAND_SHELL_INTEGRATION", "layer-shell"); + const bool ret = qputenv("QT_WAYLAND_SHELL_INTEGRATION", "layer-shell"); + if (!ret) { + qCDebug(LAYERSHELLQT) << "Unable to set QT_WAYLAND_SHELL_INTEGRATION=layer-shell"; + } }