summaryrefslogtreecommitdiff
path: root/desktop/textarea.c
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/textarea.c')
-rw-r--r--desktop/textarea.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/desktop/textarea.c b/desktop/textarea.c
index a048058f5..3fe284497 100644
--- a/desktop/textarea.c
+++ b/desktop/textarea.c
@@ -948,14 +948,15 @@ static bool textarea_drag_end(struct textarea *ta, browser_mouse_state mouse,
/* exported interface, documented in textarea.h */
-struct textarea *textarea_create(const textarea_setup *setup,
+struct textarea *textarea_create(const textarea_flags flags,
+ const textarea_setup *setup,
textarea_client_callback callback, void *data)
{
struct textarea *ret;
/* Sanity check flags */
- assert(!(setup->flags & TEXTAREA_MULTILINE &&
- setup->flags & TEXTAREA_PASSWORD));
+ assert(!(flags & TEXTAREA_MULTILINE &&
+ flags & TEXTAREA_PASSWORD));
if (callback == NULL) {
LOG(("no callback provided"));
@@ -971,7 +972,7 @@ struct textarea *textarea_create(const textarea_setup *setup,
ret->callback = callback;
ret->data = data;
- ret->flags = setup->flags;
+ ret->flags = flags;
ret->vis_width = setup->width;
ret->vis_height = setup->height;
@@ -1008,7 +1009,7 @@ struct textarea *textarea_create(const textarea_setup *setup,
ret->text.len = 1;
ret->text.utf8_len = 0;
- if (setup->flags & TEXTAREA_PASSWORD) {
+ if (flags & TEXTAREA_PASSWORD) {
ret->password.data = malloc(64);
if (ret->password.data == NULL) {
LOG(("malloc failed"));