+ if(visible)
+ {
+ translate_coords(x, y);
+ pointer_motion(x, y);
+ }
+}
+
+void Root::key_press_event(unsigned key, unsigned mod, wchar_t ch)
+{
+ if(visible)
+ key_press(Input::key_from_sys(key), mod, ch);
+}
+
+void Root::key_release_event(unsigned key, unsigned mod)
+{
+ if(visible)
+ key_release(Input::key_from_sys(key), mod);
+}
+
+void Root::translate_coords(int &x, int &y)
+{
+ x=x*geom.w/window.get_width();
+ y=geom.h-1-y*geom.h/window.get_height();