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)
{
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)
new_gi->event.type = GD_EVENT_INFO_ENTERING;
new_gi->callback_info(new_gi);
}
- else if (last_info_gi != NULL)
+ else if (last_info_gi != NULL && last_info_gi->mapped)
{
last_info_gi->event.type = GD_EVENT_INFO_LEAVING;
last_info_gi->callback_info(last_info_gi);