controls - dont "done" more than once in window controls

this avoids crashes when some over-zealous people click super-fast on
control buttons.

@fix
terminology-1.9
Carsten Haitzler 2 years ago
parent 6d7c49db7b
commit 7568afa8dc
  1. 26
      src/bin/controls.c

@ -84,7 +84,6 @@ _cb_ct_copy(void *data,
Evas_Object *term = ctx->term;
controls_hide(ctx, EINA_TRUE);
ctx = NULL;
termio_take_selection(term, ELM_SEL_TYPE_CLIPBOARD);
}
@ -98,7 +97,6 @@ _cb_ct_paste(void *data,
Evas_Object *term = ctx->term;
controls_hide(ctx, EINA_TRUE);
ctx = NULL;
termio_paste_selection(term, ELM_SEL_TYPE_CLIPBOARD);
}
@ -112,7 +110,6 @@ _cb_ct_new(void *data,
Evas_Object *term = ctx->term;
controls_hide(ctx, EINA_TRUE);
ctx = NULL;
main_new(term);
}
@ -127,7 +124,6 @@ _cb_ct_split_v(void *data,
controls_hide(ctx, EINA_TRUE);
ctx = NULL;
split_vertically(term, NULL);
}
@ -141,7 +137,6 @@ _cb_ct_split_h(void *data,
Evas_Object *term = ctx->term;
controls_hide(ctx, EINA_TRUE);
ctx = NULL;
split_horizontally(term, NULL);
}
@ -164,7 +159,6 @@ _cb_ct_set_title(void *data,
Evas_Object *term = ctx->term;
controls_hide(ctx, EINA_TRUE);
ctx = NULL;
term_set_title(termio_term_get(term));
}
@ -179,7 +173,6 @@ _cb_ct_close(void *data,
Evas_Object *win = ctx->win;
controls_hide(ctx, EINA_TRUE);
ctx = NULL;
term_close(win, term, EINA_FALSE);
}
@ -190,18 +183,17 @@ _on_sub_done(void *data)
Controls_Ctx *ctx = data;
if (ctx->donecb)
ctx->donecb(ctx->donedata);
{
ctx->donecb(ctx->donedata);
ctx->donecb = NULL;
eina_hash_del(controls, &ctx->win, ctx);
eina_hash_del(controls, &ctx->win, ctx);
if (evas_object_visible_get(ctx->frame))
{
evas_object_event_callback_add(ctx->frame, EVAS_CALLBACK_HIDE,
_cb_hidden, ctx);
}
else
{
_cb_hidden(ctx, NULL, NULL, NULL);
if (evas_object_visible_get(ctx->frame))
evas_object_event_callback_add(ctx->frame, EVAS_CALLBACK_HIDE,
_cb_hidden, ctx);
else
_cb_hidden(ctx, NULL, NULL, NULL);
}
}

Loading…
Cancel
Save