[libdazzle] shortcuts: don't create controllers unnecessarily



commit ff0438c575cb90338b20274d5323d7e28fa8eae4
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jul 17 03:43:52 2017 -0700

    shortcuts: don't create controllers unnecessarily
    
    We don't need to create the controller for the widget here. It
    should only be accessed if there is one already.

 src/shortcuts/dzl-shortcut-manager.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/shortcuts/dzl-shortcut-manager.c b/src/shortcuts/dzl-shortcut-manager.c
index bee9972..38742d3 100644
--- a/src/shortcuts/dzl-shortcut-manager.c
+++ b/src/shortcuts/dzl-shortcut-manager.c
@@ -702,7 +702,7 @@ dzl_shortcut_manager_handle_event (DzlShortcutManager *self,
       DzlShortcutController *controller;
       gboolean use_binding_sets = TRUE;
 
-      if (NULL != (controller = dzl_shortcut_controller_find (widget)))
+      if (NULL != (controller = dzl_shortcut_controller_try_find (widget)))
         {
           DzlShortcutContext *context = dzl_shortcut_controller_get_context (controller);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]