improved shifting up video display when activating screen keyboard (Android)
[rocksndiamonds.git] / src / libgame / gadgets.c
index 736f1465fb2d381b5a07419f4f28759ff55de656..98e46a5a2917e577e9159c9086ac4d5258190d1c 100644 (file)
@@ -1709,7 +1709,8 @@ boolean HandleGadgets(int mx, int my, int button)
       if (gi->textinput.cursor_position != old_cursor_position)
        DrawGadget(gi, DG_PRESSED, gi->direct_draw);
 
-      StartTextInput(gi->x, gi->y);
+      if (press_event)
+       StartTextInput(gi->x, gi->y, gi->width, gi->height);
     }
     else if (gi->type & GD_TYPE_TEXT_AREA && button != 0 && !motion_status)
     {
@@ -1725,7 +1726,8 @@ boolean HandleGadgets(int mx, int my, int button)
       if (gi->textarea.cursor_position != old_cursor_position)
        DrawGadget(gi, DG_PRESSED, gi->direct_draw);
 
-      StartTextInput(gi->x, gi->y);
+      if (press_event)
+       StartTextInput(gi->x, gi->y, gi->width, gi->height);
     }
     else if (gi->type & GD_TYPE_SELECTBOX && gi->selectbox.open &&
             !keep_selectbox_open)