Avoid launching a session from the Default Settings, even if they do
[u/mdw/putty] / unix / gtkwin.c
index 11c9c21..816211a 100644 (file)
@@ -1205,6 +1205,7 @@ void notify_remote_exit(void *frontend)
            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_show(inst->restartitem);
@@ -3305,6 +3306,7 @@ void set_window_icon(GtkWidget *window, const char *const *const *icon,
                     int n_icon)
 {
     GdkPixmap *iconpm;
+    GdkBitmap *iconmask;
 #if GTK_CHECK_VERSION(2,0,0)
     GList *iconlist;
     int n;
@@ -3314,9 +3316,9 @@ void set_window_icon(GtkWidget *window, const char *const *const *icon,
        return;
 
     gtk_widget_realize(window);
-    iconpm = gdk_pixmap_create_from_xpm_d(window->window, NULL,
+    iconpm = gdk_pixmap_create_from_xpm_d(window->window, &iconmask,
                                          NULL, (gchar **)icon[0]);
-    gdk_window_set_icon(window->window, NULL, iconpm, NULL);
+    gdk_window_set_icon(window->window, NULL, iconpm, iconmask);
 
 #if GTK_CHECK_VERSION(2,0,0)
     iconlist = NULL;
@@ -3484,7 +3486,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 */
     }