]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/root.cpp
Add Container class
[libs/gltk.git] / source / root.cpp
index 224e5bc30ef3a975fb022da83a6ba19e4be64779..6bc5793df6e0c4b5140660a9f96f8d3095e58c5f 100644 (file)
@@ -1,16 +1,18 @@
 /* $Id$
 
 This file is part of libmspgltk
-Copyright © 2007  Mikko Rasa, Mikkosoft Productions
+Copyright © 2007-2009  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
+#include <msp/input/keys.h>
 #include "root.h"
 
 namespace Msp {
 namespace GLtk {
 
-Root::Root(Resources &r, Graphics::Window &w):
+Root::Root(const Resources &r, Graphics::Window &w):
+       Widget(r),
        Panel(r),
        window(w)
 {
@@ -55,13 +57,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)