projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Raise the default scrollback from 200 to 2000 lines. The former was
[u/mdw/putty]
/
unix
/
gtkwin.c
diff --git
a/unix/gtkwin.c
b/unix/gtkwin.c
index
f403a80
..
667c72b
100644
(file)
--- 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;
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);
}
show_mouseptr(inst, 0);
term_seen_key_event(inst->term);
}
@@
-1360,7
+1361,7
@@
void frontend_keypress(void *handle)
* any keypress.
*/
if (inst->exited)
* any keypress.
*/
if (inst->exited)
- exit(0);
+
cleanup_
exit(0);
}
static gint idle_exit_func(gpointer data)
}
static gint idle_exit_func(gpointer data)
@@
-1379,13
+1380,11
@@
static gint idle_exit_func(gpointer data)
ldisc_free(inst->ldisc);
inst->ldisc = NULL;
}
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);
}
gtk_widget_set_sensitive(inst->restartitem, TRUE);
}
@@
-3010,7
+3009,7
@@
void change_settings_menuitem(GtkMenuItem *item, gpointer data)
4, 12, 5, 13, 6, 14, 7, 15
};
struct gui_data *inst = (struct gui_data *)data;
4, 12, 5, 13, 6, 14, 7, 15
};
struct gui_data *inst = (struct gui_data *)data;
- char *title
= dupcat(appname, " Reconfiguration", NULL)
;
+ char *title;
Conf *oldconf, *newconf;
int i, j, need_size;
Conf *oldconf, *newconf;
int i, j, need_size;
@@
-3021,6
+3020,8
@@
void change_settings_menuitem(GtkMenuItem *item, gpointer data)
else
inst->reconfiguring = TRUE;
else
inst->reconfiguring = TRUE;
+ title = dupcat(appname, " Reconfiguration", NULL);
+
oldconf = inst->conf;
newconf = conf_copy(inst->conf);
oldconf = inst->conf;
newconf = conf_copy(inst->conf);
@@
-3034,9
+3035,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.
*/
* 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);
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 */
/* Pass new config data to the terminal */
term_reconfig(inst->term, inst->conf);
/* Pass new config data to the back end */
@@
-3069,7
+3071,7
@@
void change_settings_menuitem(GtkMenuItem *item, gpointer data)
* repaint the space in between the window border
* and the text area.
*/
* 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);
}
set_window_background(inst);
draw_backing_rect(inst);
}
@@
-3134,6
+3136,7
@@
void change_settings_menuitem(GtkMenuItem *item, gpointer data)
string_width("Could not change fonts in terminal window:"),
"OK", 'o', +1, 1,
NULL);
string_width("Could not change fonts in terminal window:"),
"OK", 'o', +1, 1,
NULL);
+ sfree(msgboxtext);
sfree(errmsg);
} else {
need_size = TRUE;
sfree(errmsg);
} else {
need_size = TRUE;
@@
-3228,6
+3231,7
@@
void fork_and_exec_self(struct gui_data *inst, int fd_to_close, ...)
pid = fork();
if (pid < 0) {
perror("fork");
pid = fork();
if (pid < 0) {
perror("fork");
+ sfree(args);
return;
}
return;
}
@@
-3261,6
+3265,7
@@
void fork_and_exec_self(struct gui_data *inst, int fd_to_close, ...)
} else {
int status;
} else {
int status;
+ sfree(args);
waitpid(pid, &status, 0);
}
waitpid(pid, &status, 0);
}
@@
-3302,7
+3307,7
@@
void dup_session_menuitem(GtkMenuItem *item, gpointer gdata)
}
sprintf(option, "---[%d,%d]", pipefd[0], size);
}
sprintf(option, "---[%d,%d]", pipefd[0], size);
-
fcntl(pipefd[0], F_SETFD, 0
);
+
noncloexec(pipefd[0]
);
fork_and_exec_self(inst, pipefd[1], option, NULL);
close(pipefd[0]);
fork_and_exec_self(inst, pipefd[1], option, NULL);
close(pipefd[0]);
@@
-3365,6
+3370,8
@@
int read_dupsession_data(struct gui_data *inst, Conf *conf, char *arg)
}
}
}
}
+ sfree(data);
+
return 0;
}
return 0;
}