diff options
Diffstat (limited to 'src/FbTk/KeyUtil.cc')
-rw-r--r-- | src/FbTk/KeyUtil.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/FbTk/KeyUtil.cc b/src/FbTk/KeyUtil.cc index 71dc22a..72e78eb 100644 --- a/src/FbTk/KeyUtil.cc +++ b/src/FbTk/KeyUtil.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: KeyUtil.cc,v 1.3 2003/10/05 07:20:16 rathnor Exp $ | 22 | // $Id: KeyUtil.cc,v 1.4 2003/10/13 19:31:56 fluxgen Exp $ |
23 | 23 | ||
24 | #include "KeyUtil.hh" | 24 | #include "KeyUtil.hh" |
25 | #include "App.hh" | 25 | #include "App.hh" |
@@ -28,12 +28,12 @@ | |||
28 | 28 | ||
29 | namespace FbTk { | 29 | namespace FbTk { |
30 | 30 | ||
31 | KeyUtil *KeyUtil::s_keyutil = 0; | 31 | std::auto_ptr<KeyUtil> KeyUtil::s_keyutil; |
32 | 32 | ||
33 | KeyUtil *KeyUtil::instance() { | 33 | KeyUtil &KeyUtil::instance() { |
34 | if (s_keyutil == 0) | 34 | if (s_keyutil.get() == 0) |
35 | s_keyutil = new KeyUtil(); | 35 | s_keyutil.reset(new KeyUtil()); |
36 | return s_keyutil; | 36 | return *s_keyutil.get(); |
37 | } | 37 | } |
38 | 38 | ||
39 | 39 | ||
@@ -170,7 +170,7 @@ void KeyUtil::ungrabKeys() { | |||
170 | } | 170 | } |
171 | 171 | ||
172 | unsigned int KeyUtil::keycodeToModmask(unsigned int keycode) { | 172 | unsigned int KeyUtil::keycodeToModmask(unsigned int keycode) { |
173 | XModifierKeymap *modmap = instance()->m_modmap; | 173 | XModifierKeymap *modmap = instance().m_modmap; |
174 | 174 | ||
175 | if (!modmap) return 0; | 175 | if (!modmap) return 0; |
176 | 176 | ||