summaryrefslogtreecommitdiff
path: root/src/ui/inputwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/inputwidget.c')
-rw-r--r--src/ui/inputwidget.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c
index 3f178fc5..06bb9474 100644
--- a/src/ui/inputwidget.c
+++ b/src/ui/inputwidget.c
@@ -21,6 +21,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 21SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
22 22
23#include "inputwidget.h" 23#include "inputwidget.h"
24#include "command.h"
24#include "paint.h" 25#include "paint.h"
25#include "util.h" 26#include "util.h"
26#include "keys.h" 27#include "keys.h"
@@ -615,6 +616,17 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) {
615 } 616 }
616 return iFalse; 617 return iFalse;
617 } 618 }
619 else if (isCommand_UserEvent(ev, "keyboard.changed")) {
620 if (isFocused_Widget(d) && arg_Command(command_UserEvent(ev))) {
621 iRect rect = bounds_Widget(w);
622 rect.pos.y -= value_Anim(&get_Window()->rootOffset);
623 const iInt2 visRoot = visibleRootSize_Window(get_Window());
624 if (bottom_Rect(rect) > visRoot.y) {
625 setValue_Anim(&get_Window()->rootOffset, -(bottom_Rect(rect) - visRoot.y), 250);
626 }
627 }
628 return iFalse;
629 }
618 else if (isMetricsChange_UserEvent(ev)) { 630 else if (isMetricsChange_UserEvent(ev)) {
619 updateMetrics_InputWidget_(d); 631 updateMetrics_InputWidget_(d);
620 } 632 }