X-Git-Url: http://git.tdb.fi/?p=libs%2Fgltk.git;a=blobdiff_plain;f=source%2Froot.cpp;h=c54ab7b00682b78bd39041eb09565bc46cd3254d;hp=a90ea5a23d9eec4a3b3bacc34b94fb1a912b8b4c;hb=6d73e04329fc3752552773e4d11d7374caf779f6;hpb=18a5af8e80903eb9738cefe03825595877fbf447 diff --git a/source/root.cpp b/source/root.cpp index a90ea5a..c54ab7b 100644 --- a/source/root.cpp +++ b/source/root.cpp @@ -210,14 +210,7 @@ bool Root::key_press_event(unsigned key) { // XXX Modifiers if(visible) - { - Widget *old_focus = input_focus; - - key_press(key, 0); - - if(input_focus || old_focus) - return true; - } + return key_press(key, 0); return false; } @@ -225,14 +218,7 @@ bool Root::key_press_event(unsigned key) bool Root::key_release_event(unsigned key) { if(visible) - { - Widget *old_focus = input_focus; - - key_release(key, 0); - - if(input_focus || old_focus) - return true; - } + return key_release(key, 0); return false; } @@ -240,14 +226,7 @@ bool Root::key_release_event(unsigned key) bool Root::character_event(StringCodec::unichar ch) { if(visible) - { - Widget *old_focus = input_focus; - - character(ch); - - if(input_focus || old_focus) - return true; - } + return character(ch); return false; }