From b197eab01d1bf3c88c32fb158f0eeed9ca650443 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 7 Jan 2002 23:46:58 +0000 Subject: Added Display * to Keys constructor and added ungrabKeys function --- src/Keys.hh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Keys.hh b/src/Keys.hh index 8f32465..910c866 100644 --- a/src/Keys.hh +++ b/src/Keys.hh @@ -18,6 +18,9 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. + +// $Id: Keys.hh,v 1.3 2002/01/07 23:46:58 fluxgen Exp $ + #ifndef _KEYS_HH_ #define _KEYS_HH_ @@ -49,19 +52,20 @@ enum KeyAction{ LASTKEYGRAB }; - Keys(char *filename); + Keys(Display *display, char *filename=0); ~Keys(); bool load(char *filename=0); KeyAction getAction(XKeyEvent *ke); bool reconfigure(char *filename); const char *getActionStr(KeyAction action); std::string getExecCommand() { return m_execcmdstring; } + private: void deleteTree(); - + void ungrabKeys(); void bindKey(unsigned int key, unsigned int mod); - unsigned int getModifier(char *modstr); - unsigned int getKey(char *keystr); + unsigned int getModifier(const char *modstr); + unsigned int getKey(const char *keystr); void grabKey(unsigned int key, unsigned int mod); std::string filename; @@ -112,6 +116,7 @@ private: std::vector m_keylist; t_key *m_abortkey; //abortkey for keygrabbing chain std::string m_execcmdstring; //copy of the execcommandstring + Display *m_display; }; #endif // _KEYS_HH_ -- cgit v0.11.2