From d99f9dc2645a443649965c44026f80631561f2b3 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 19 Jul 2024 22:51:48 +0200 Subject: Dont show global hotkeys on wayland if not supported --- src/global_shortcuts.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/global_shortcuts.c') diff --git a/src/global_shortcuts.c b/src/global_shortcuts.c index 7037eb8..9933891 100644 --- a/src/global_shortcuts.c +++ b/src/global_shortcuts.c @@ -139,14 +139,16 @@ static void dbus_signal_create_session(GDBusProxy *proxy, gchar *sender_name, gc GVariant *results = NULL; g_variant_get(parameters, "(u@a{sv})", &response, &results); - if(response != 0 || !results) + if(response != 0 || !results) { + cu->callback(false, cu->userdata); goto done; + } gchar *session_handle = NULL; if(g_variant_lookup(results, "session_handle", "s", &session_handle) && session_handle) { cu->self->session_handle = strdup(session_handle); cu->self->session_created = true; - cu->callback(cu->userdata); + cu->callback(true, cu->userdata); } done: -- cgit v1.2.3