summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-20 15:58:02 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-20 15:58:02 +0200
commitbebfe01d731a977c23c325dd37361f6d5f7268c2 (patch)
tree4fe2e39348eb3f95ae8c4f8e2dafdb110a0ae623 /src/managers/KeybindManager.cpp
parentfde68dd8cf19fb2c044c2f7f1dd6dec5cec8d642 (diff)
Added a custom NO_XWAYLAND flag
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index 50d20524..f75e611c 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -89,7 +89,11 @@ bool CKeybindManager::handleInternalKeybinds(xkb_keysym_t keysym) {
// Dispatchers
void CKeybindManager::spawn(std::string args) {
- args = "WAYLAND_DISPLAY=" + std::string(g_pCompositor->m_szWLDisplaySocket) + " DISPLAY=" + std::string(g_pXWaylandManager->m_sWLRXWayland->display_name) + " " + args;
+ if (g_pXWaylandManager->m_sWLRXWayland)
+ args = "WAYLAND_DISPLAY=" + std::string(g_pCompositor->m_szWLDisplaySocket) + " DISPLAY=" + std::string(g_pXWaylandManager->m_sWLRXWayland->display_name) + " " + args;
+ else
+ args = "WAYLAND_DISPLAY=" + std::string(g_pCompositor->m_szWLDisplaySocket) + " " + args;
+
Debug::log(LOG, "Executing %s", args.c_str());
if (fork() == 0) {
execl("/bin/sh", "/bin/sh", "-c", args.c_str(), nullptr);