diff options
author | simonb <simonb> | 2006-06-25 14:00:13 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-06-25 14:00:13 (GMT) |
commit | 131d04cf423b36bcfeba351eecc520b94586f729 (patch) | |
tree | 9139ba7e9b059d052cadcb30b48b98edf03d585a | |
parent | 80389b5dd5e7be4025cafbb2e7b055fd06f4f56d (diff) | |
download | fluxbox-131d04cf423b36bcfeba351eecc520b94586f729.zip fluxbox-131d04cf423b36bcfeba351eecc520b94586f729.tar.bz2 |
Check for NoSymbol more explicitly - thanks Julien Trolet (dmxen at
sourceforge)
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/FbTk/KeyUtil.cc | 6 |
2 files changed, 7 insertions, 2 deletions
@@ -1,6 +1,9 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 1.0rc2: | 2 | Changes for 1.0rc2: |
3 | *06/06/25: | 3 | *06/06/25: |
4 | * Explicitly map NoSymbol to keycode 0 (thanks Julien Trolet) | ||
5 | (seems to be assigned to several keycodes) | ||
6 | FbTk/KeyUtil.cc | ||
4 | * Menu aware of text encodings (Simon) | 7 | * Menu aware of text encodings (Simon) |
5 | - new menu file options: | 8 | - new menu file options: |
6 | [encoding] {CODESET} | 9 | [encoding] {CODESET} |
diff --git a/src/FbTk/KeyUtil.cc b/src/FbTk/KeyUtil.cc index cb0db93..4300cd7 100644 --- a/src/FbTk/KeyUtil.cc +++ b/src/FbTk/KeyUtil.cc | |||
@@ -172,8 +172,10 @@ void KeyUtil::grabKey(unsigned int key, unsigned int mod) { | |||
172 | unsigned int KeyUtil::getKey(const char *keystr) { | 172 | unsigned int KeyUtil::getKey(const char *keystr) { |
173 | if (!keystr) | 173 | if (!keystr) |
174 | return 0; | 174 | return 0; |
175 | return XKeysymToKeycode(App::instance()->display(), | 175 | KeySym sym = XStringToKeysym(keystr); |
176 | XStringToKeysym(keystr)); | 176 | if (sym==NoSymbol) |
177 | return 0; | ||
178 | return XKeysymToKeycode(App::instance()->display(), sym); | ||
177 | } | 179 | } |
178 | 180 | ||
179 | 181 | ||