bool SystemKeyboardInput::key_press(unsigned key)
{
+ if(!root.is_visible())
+ return false;
+
// TODO modifiers
if(root.key_press(key, 0))
return true;
bool SystemKeyboardInput::key_release(unsigned key)
{
- return root.key_release(key, 0);
+ if(root.is_visible())
+ return root.key_release(key, 0);
+ else
+ return false;
}
bool SystemKeyboardInput::character(StringCodec::unichar ch)
{
- return root.character(ch);
+ if(root.is_visible())
+ return root.character(ch);
+ else
+ return false;
}
} // namespace GLtk