[libdazzle] shortcuts: ignore controller if no global keybindings are registered
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] shortcuts: ignore controller if no global keybindings are registered
- Date: Sun, 5 May 2019 17:09:18 +0000 (UTC)
commit e25ca9c8511706edafa79da20e8a53b688da8817
Author: Christian Hergert <chergert redhat com>
Date: Sun May 5 10:06:13 2019 -0700
shortcuts: ignore controller if no global keybindings are registered
This may be masking another problem, but it is a short-circuit we should
be doing nonetheless. The themes shouldn't be able to add any global
keybindings that don't already exist as global command/action/callbacks.
src/shortcuts/dzl-shortcut-controller.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/shortcuts/dzl-shortcut-controller.c b/src/shortcuts/dzl-shortcut-controller.c
index 604bf8f..f079d15 100644
--- a/src/shortcuts/dzl-shortcut-controller.c
+++ b/src/shortcuts/dzl-shortcut-controller.c
@@ -857,6 +857,9 @@ dzl_shortcut_controller_do_global (DzlShortcutController *self,
g_assert ((phase & DZL_SHORTCUT_PHASE_GLOBAL) != 0);
g_assert (GTK_IS_WIDGET (widget));
+ if (!priv->have_global)
+ return DZL_SHORTCUT_MATCH_NONE;
+
manager = dzl_shortcut_controller_get_manager (self);
g_assert (DZL_IS_SHORTCUT_CONTROLLER (self));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]