+ if (strcmp(gi->textinput.value, gi->textinput.last_value) != 0)
+ strcpy(gi->textinput.last_value, gi->textinput.value);
+ else
+ gadget_changed = FALSE;
+ }
+
+ /* selectbox does not change its value when closed by clicking outside */
+ if (gi->type & GD_TYPE_SELECTBOX)
+ gadget_changed = FALSE;
+
+ DrawGadget(gi, DG_UNPRESSED, gi->direct_draw);
+
+ gi->event.type = GD_EVENT_TEXT_LEAVING;