X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/8a9ec85763809cd3e849d3b00750ba74222dee18..7dc9a22ee27a65871bac1166d811d8dbb818fe45:/unix/gtkwin.c diff --git a/unix/gtkwin.c b/unix/gtkwin.c index f403a807..4a1df45d 100644 --- a/unix/gtkwin.c +++ b/unix/gtkwin.c @@ -1223,7 +1223,8 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data) void input_method_commit_event(GtkIMContext *imc, gchar *str, gpointer data) { struct gui_data *inst = (struct gui_data *)data; - lpage_send(inst->ldisc, CS_UTF8, str, strlen(str), 1); + if (inst->ldisc) + lpage_send(inst->ldisc, CS_UTF8, str, strlen(str), 1); show_mouseptr(inst, 0); term_seen_key_event(inst->term); } @@ -1379,13 +1380,11 @@ static gint idle_exit_func(gpointer data) ldisc_free(inst->ldisc); inst->ldisc = NULL; } - if (inst->back) { - inst->back->free(inst->backhandle); - inst->backhandle = NULL; - inst->back = NULL; - term_provide_resize_fn(inst->term, NULL, NULL); - update_specials_menu(inst); - } + inst->back->free(inst->backhandle); + inst->backhandle = NULL; + inst->back = NULL; + term_provide_resize_fn(inst->term, NULL, NULL); + update_specials_menu(inst); gtk_widget_set_sensitive(inst->restartitem, TRUE); } @@ -3034,9 +3033,10 @@ void change_settings_menuitem(GtkMenuItem *item, gpointer data) * Flush the line discipline's edit buffer in the case * where local editing has just been disabled. */ - ldisc_configure(inst->ldisc, inst->conf); - if (inst->ldisc) + if (inst->ldisc) { + ldisc_configure(inst->ldisc, inst->conf); ldisc_send(inst->ldisc, NULL, 0, 0); + } /* Pass new config data to the terminal */ term_reconfig(inst->term, inst->conf); /* Pass new config data to the back end */ @@ -3069,7 +3069,7 @@ void change_settings_menuitem(GtkMenuItem *item, gpointer data) * repaint the space in between the window border * and the text area. */ - if (i == 258) { + if (ww[i] == 258) { set_window_background(inst); draw_backing_rect(inst); }