diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2017-07-01 20:10:14 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2017-07-01 20:10:14 +0200 |
commit | 85df1646ecccc7e484e2efc903166b89e4c55684 (patch) | |
tree | 66bb29f09354a3a9bb7b448dfc10929f27d0210e /src/gui/desktop.c | |
parent | 8fa1c09199378f86ca7c3fc4b844bd272926cdf6 (diff) | |
download | abaos-85df1646ecccc7e484e2efc903166b89e4c55684.tar.gz abaos-85df1646ecccc7e484e2efc903166b89e4c55684.tar.bz2 |
fixed get_focus error in widget (called the wrong parent)
the text widget reacts to mouse down and key events and appends text to the output buffer
so we have text input in GUI mode
Diffstat (limited to 'src/gui/desktop.c')
-rw-r--r-- | src/gui/desktop.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gui/desktop.c b/src/gui/desktop.c index ad4aad9..4a3876e 100644 --- a/src/gui/desktop.c +++ b/src/gui/desktop.c @@ -13,7 +13,7 @@ static desktop_vtable_t desktop_vtable = { desktop_on_mouse_down, desktop_on_mouse_up, desktop_on_mouse_move, - composite_widget_on_key_down, + desktop_on_key_down, composite_widget_on_key_up }, composite_widget_add_child @@ -94,3 +94,13 @@ void desktop_on_mouse_move( void *obj, const int old_x, const int old_y, const i desktop->needs_redrawing = true; } + +void desktop_on_key_down( void *obj, char c ) +{ + desktop_t *desktop = obj; + + composite_widget_on_key_down( obj, c ); + + desktop->needs_redrawing = true; +} + |