diff options
Diffstat (limited to 'src/Keys.hh')
-rw-r--r-- | src/Keys.hh | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Keys.hh b/src/Keys.hh index 43f4445..7a6b3b8 100644 --- a/src/Keys.hh +++ b/src/Keys.hh | |||
@@ -23,6 +23,7 @@ | |||
23 | #define KEYS_HH | 23 | #define KEYS_HH |
24 | 24 | ||
25 | #include "FbTk/NotCopyable.hh" | 25 | #include "FbTk/NotCopyable.hh" |
26 | #include "FbTk/RefCount.hh" | ||
26 | 27 | ||
27 | #include <X11/Xlib.h> | 28 | #include <X11/Xlib.h> |
28 | #include <string> | 29 | #include <string> |
@@ -94,7 +95,8 @@ public: | |||
94 | 95 | ||
95 | private: | 96 | private: |
96 | class t_key; // helper class to build a 'keytree' | 97 | class t_key; // helper class to build a 'keytree' |
97 | typedef std::map<std::string, t_key *> keyspace_t; | 98 | typedef FbTk::RefCount<t_key> RefKey; |
99 | typedef std::map<std::string, RefKey> keyspace_t; | ||
98 | typedef std::map<Window, int> WindowMap; | 100 | typedef std::map<Window, int> WindowMap; |
99 | typedef std::map<Window, FbTk::EventHandler*> HandlerMap; | 101 | typedef std::map<Window, FbTk::EventHandler*> HandlerMap; |
100 | 102 | ||
@@ -108,17 +110,17 @@ private: | |||
108 | 110 | ||
109 | // Load default keybindings for when there are errors loading the keys file | 111 | // Load default keybindings for when there are errors loading the keys file |
110 | void loadDefaults(); | 112 | void loadDefaults(); |
111 | void setKeyMode(t_key *keyMode); | 113 | void setKeyMode(const FbTk::RefCount<t_key> &keyMode); |
112 | 114 | ||
113 | 115 | ||
114 | // member variables | 116 | // member variables |
115 | std::string m_filename; | 117 | std::string m_filename; |
116 | FbTk::AutoReloadHelper* m_reloader; | 118 | FbTk::AutoReloadHelper* m_reloader; |
117 | t_key *m_keylist; | 119 | RefKey m_keylist; |
118 | keyspace_t m_map; | 120 | keyspace_t m_map; |
119 | 121 | ||
120 | // former doAction static var, we need to access it from deleteTree | 122 | RefKey next_key; |
121 | t_key *next_key, *saved_keymode; | 123 | RefKey saved_keymode; |
122 | 124 | ||
123 | WindowMap m_window_map; | 125 | WindowMap m_window_map; |
124 | HandlerMap m_handler_map; | 126 | HandlerMap m_handler_map; |