]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/root.cpp
Clear focus in Panel if focused child is removed
[libs/gltk.git] / source / root.cpp
index 224e5bc30ef3a975fb022da83a6ba19e4be64779..1c030e82c8c38f103fa5234bde231163fceb3706 100644 (file)
@@ -5,6 +5,7 @@ Copyright © 2007  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
+#include <msp/input/keys.h>
 #include "root.h"
 
 namespace Msp {
@@ -55,13 +56,13 @@ void Root::pointer_motion_event(int x, int y)
 void Root::key_press_event(unsigned key, unsigned mod, wchar_t ch)
 {
        if(visible)
-               key_press(key, mod, ch);
+               key_press(Input::key_from_sys(key), mod, ch);
 }
 
 void Root::key_release_event(unsigned key, unsigned mod)
 {
        if(visible)
-               key_release(key, mod);
+               key_release(Input::key_from_sys(key), mod);
 }
 
 void Root::translate_coords(int &x, int &y)