Fix `restart-reset-terminal': terminal now restored to a sensible state when
[sgt/putty] / unix / gtkwin.c
index 6193a04..ff08ec0 100644 (file)
@@ -1491,7 +1491,7 @@ char * retrieve_cutbuffer(int * nbytes)
     return ptr;
 }
 
-void write_clip(void *frontend, wchar_t * data, int len, int must_deselect)
+void write_clip(void *frontend, wchar_t * data, int *attr, int len, int must_deselect)
 {
     struct gui_data *inst = (struct gui_data *)frontend;
     if (inst->pasteout_data)
@@ -1848,7 +1848,7 @@ void sys_cursor(void *frontend, int x, int y)
  * may want to perform additional actions on any kind of bell (for
  * example, taskbar flashing in Windows).
  */
-void beep(void *frontend, int mode)
+void do_beep(void *frontend, int mode)
 {
     if (mode != BELL_VISUAL)
        gdk_beep();
@@ -2858,7 +2858,7 @@ void clear_scrollback_menuitem(GtkMenuItem *item, gpointer data)
 void reset_terminal_menuitem(GtkMenuItem *item, gpointer data)
 {
     struct gui_data *inst = (struct gui_data *)data;
-    term_pwron(inst->term);
+    term_pwron(inst->term, TRUE);
     if (inst->ldisc)
        ldisc_send(inst->ldisc, NULL, 0, 0);
 }
@@ -3229,6 +3229,7 @@ void restart_session_menuitem(GtkMenuItem *item, gpointer data)
 
     if (!inst->back) {
        logevent(inst, "----- Session restarted -----");
+       term_pwron(inst->term, FALSE);
        start_backend(inst);
        inst->exited = FALSE;
     }