diff options
Diffstat (limited to 'src/ui/inputwidget.c')
-rw-r--r-- | src/ui/inputwidget.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index fa65cf3c..690107a2 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c | |||
@@ -541,6 +541,11 @@ static int contentHeight_InputWidget_(const iInputWidget *d) { | |||
541 | return size_Range(&d->visWrapLines) * lineHeight_Text(d->font); | 541 | return size_Range(&d->visWrapLines) * lineHeight_Text(d->font); |
542 | } | 542 | } |
543 | 543 | ||
544 | static void updateTextInputRect_InputWidget_(const iInputWidget *d) { | ||
545 | const iRect bounds = bounds_Widget(constAs_Widget(d)); | ||
546 | SDL_SetTextInputRect(&(SDL_Rect){ bounds.pos.x, bounds.pos.y, bounds.size.x, bounds.size.y }); | ||
547 | } | ||
548 | |||
544 | static void updateMetrics_InputWidget_(iInputWidget *d) { | 549 | static void updateMetrics_InputWidget_(iInputWidget *d) { |
545 | iWidget *w = as_Widget(d); | 550 | iWidget *w = as_Widget(d); |
546 | updateSizeForFixedLength_InputWidget_(d); | 551 | updateSizeForFixedLength_InputWidget_(d); |
@@ -553,6 +558,7 @@ static void updateMetrics_InputWidget_(iInputWidget *d) { | |||
553 | invalidateBuffered_InputWidget_(d); | 558 | invalidateBuffered_InputWidget_(d); |
554 | if (height_Rect(w->rect) != oldHeight) { | 559 | if (height_Rect(w->rect) != oldHeight) { |
555 | postCommand_Widget(d, "input.resized"); | 560 | postCommand_Widget(d, "input.resized"); |
561 | updateTextInputRect_InputWidget_(d); | ||
556 | } | 562 | } |
557 | } | 563 | } |
558 | 564 | ||
@@ -988,6 +994,7 @@ void begin_InputWidget(iInputWidget *d) { | |||
988 | iZap(d->mark); | 994 | iZap(d->mark); |
989 | } | 995 | } |
990 | enableEditorKeysInMenus_(iFalse); | 996 | enableEditorKeysInMenus_(iFalse); |
997 | updateTextInputRect_InputWidget_(d); | ||
991 | updateVisible_InputWidget_(d); | 998 | updateVisible_InputWidget_(d); |
992 | } | 999 | } |
993 | 1000 | ||