called from within a backend function which will expect its own
backend pointer to still be valid on return. Instead, move all the
real functionality of notify_remote_exit() out into a GTK idle
function.
git-svn-id: svn://svn.tartarus.org/sgt/putty@8304
cda61777-01e9-0310-a592-
d414129be87e
int mouseptr_visible;
int busy_status;
guint term_paste_idle_id;
int mouseptr_visible;
int busy_status;
guint term_paste_idle_id;
+ guint term_exit_idle_id;
int alt_keycode;
int alt_digits;
char wintitle[sizeof(((Config *)0)->wintitle)];
int alt_keycode;
int alt_digits;
char wintitle[sizeof(((Config *)0)->wintitle)];
-void notify_remote_exit(void *frontend)
+static gint idle_exit_func(gpointer data)
- struct gui_data *inst = (struct gui_data *)frontend;
+ struct gui_data *inst = (struct gui_data *)data;
int exitcode;
if (!inst->exited &&
int exitcode;
if (!inst->exited &&
}
gtk_widget_show(inst->restartitem);
}
}
gtk_widget_show(inst->restartitem);
}
+
+ gtk_idle_remove(inst->term_exit_idle_id);
+ return TRUE;
+}
+
+void notify_remote_exit(void *frontend)
+{
+ struct gui_data *inst = (struct gui_data *)frontend;
+
+ inst->term_exit_idle_id = gtk_idle_add(idle_exit_func, inst);
}
static gint timer_trigger(gpointer data)
}
static gint timer_trigger(gpointer data)