Gareth pointed out yesterday that the Unix terminal front end treats
[sgt/putty] / unix / gtkwin.c
index 430e2b5..311cf38 100644 (file)
@@ -663,13 +663,12 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
            end = 2;
        }
 
-       /* Control-Break is the same as Control-C */
+       /* Control-Break sends a Break special to the backend */
        if (event->keyval == GDK_Break &&
            (event->state & GDK_CONTROL_MASK)) {
-           output[1] = '\003';
-           use_ucsoutput = FALSE;
-           end = 2;
-           special = TRUE;
+           if (inst->back)
+               inst->back->special(inst->backhandle, TS_BRK);
+           return TRUE;
        }
 
        /* We handle Return ourselves, because it needs to be flagged as
@@ -1868,7 +1867,7 @@ void sys_cursor(void *frontend, int x, int y)
  */
 void do_beep(void *frontend, int mode)
 {
-    if (mode != BELL_VISUAL)
+    if (mode == BELL_DEFAULT)
        gdk_beep();
 }
 
@@ -3486,7 +3485,8 @@ int pt_main(int argc, char **argv)
 
        cmdline_run_saved(&inst->cfg);
 
-       if (!cfg_launchable(&inst->cfg) && !cfgbox(&inst->cfg))
+       if ((!loaded_session || !cfg_launchable(&inst->cfg)) &&
+           !cfgbox(&inst->cfg))
            exit(0);                   /* config box hit Cancel */
     }