From 908ba3eef5f6a5b698e4e3cdfe85ed9c8f943e92 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Sun, 19 May 2024 02:32:43 -0700 Subject: [PATCH] hyprland/global_shortcuts: fix crash when protocol is not present --- src/services/pipewire/module.md | 8 ++++++++ src/wayland/hyprland/global_shortcuts/qml.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 src/services/pipewire/module.md diff --git a/src/services/pipewire/module.md b/src/services/pipewire/module.md new file mode 100644 index 0000000..e10809e --- /dev/null +++ b/src/services/pipewire/module.md @@ -0,0 +1,8 @@ +name = "Quickshell.Services.PipeWire" +description = "Pipewire API" +headers = [ + "qml.hpp", + "link.hpp", + "node.hpp", +] +----- diff --git a/src/wayland/hyprland/global_shortcuts/qml.cpp b/src/wayland/hyprland/global_shortcuts/qml.cpp index ff957ea..9442337 100644 --- a/src/wayland/hyprland/global_shortcuts/qml.cpp +++ b/src/wayland/hyprland/global_shortcuts/qml.cpp @@ -25,7 +25,7 @@ void GlobalShortcut::onPostReload() { } auto* manager = GlobalShortcutManager::instance(); - if (manager == nullptr) { + if (!manager->isActive()) { qWarning() << "The active compositor does not support hyprland_global_shortcuts_v1."; qWarning() << "GlobalShortcut will not work."; return;