aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-01-08 21:45:49 (GMT)
committerfluxgen <fluxgen>2002-01-08 21:45:49 (GMT)
commitfad5148752284ed6a29fc095a57355749709fae3 (patch)
tree40eb0b66b0e157311b529edeafe38eb38283f795
parent11ae668af7ca716285f7768c68f5d04a153c3bd2 (diff)
downloadfluxbox_paul-fad5148752284ed6a29fc095a57355749709fae3.zip
fluxbox_paul-fad5148752284ed6a29fc095a57355749709fae3.tar.bz2
Fixed memorybug and typeo
-rw-r--r--src/Keys.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/Keys.cc b/src/Keys.cc
index fd39ecd..53c9911 100644
--- a/src/Keys.cc
+++ b/src/Keys.cc
@@ -1,4 +1,4 @@
1// Key2.cc for Fluxbox - an X11 Window manager 1// Keys.cc for Fluxbox - an X11 Window manager
2// Copyright (c) 2001 Henrik Kinnunen (fluxgen@linuxmail.org) 2// Copyright (c) 2001 Henrik Kinnunen (fluxgen@linuxmail.org)
3// 3//
4// Permission is hereby granted, free of charge, to any person obtaining a 4// Permission is hereby granted, free of charge, to any person obtaining a
@@ -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: Keys.cc,v 1.5 2002/01/08 12:13:25 fluxgen Exp $ 22//$Id: Keys.cc,v 1.6 2002/01/08 21:45:49 fluxgen Exp $
23 23
24#ifdef HAVE_CONFIG_H 24#ifdef HAVE_CONFIG_H
25# include "config.h" 25# include "config.h"
@@ -133,9 +133,9 @@ m_display(display)
133 load(filename); 133 load(filename);
134} 134}
135 135
136Keys::~Keys() { 136Keys::~Keys() {
137 deleteTree();
138 ungrabKeys(); 137 ungrabKeys();
138 deleteTree();
139} 139}
140 140
141//--------- deleteTree ----------- 141//--------- deleteTree -----------
@@ -174,7 +174,9 @@ bool Keys::load(char *filename) {
174 174
175 //ungrab all keys 175 //ungrab all keys
176 ungrabKeys(); 176 ungrabKeys();
177 177 //free memory of previous grabs
178 deleteTree();
179
178 XSync(m_display, False); 180 XSync(m_display, False);
179 181
180 //open the file 182 //open the file
@@ -272,7 +274,7 @@ bool Keys::load(char *filename) {
272 274
273 //add the keychain to list 275 //add the keychain to list
274 if (!mergeTree(current_key)) 276 if (!mergeTree(current_key))
275 cerr<<"Keys: Faild to merge keytree!"<<endl; 277 cerr<<"Keys: Failed to merge keytree!"<<endl;
276 278
277 #ifdef DEBUG 279 #ifdef DEBUG
278 if (m_actionlist[i].action == Keys::EXECUTE) { 280 if (m_actionlist[i].action == Keys::EXECUTE) {