1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Still some window closing bugs/crashes.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2225 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-12-09 14:03:44 +00:00 committed by cras
parent ac8109ac9e
commit 6a1f6b560f

View File

@ -129,7 +129,7 @@ static GSList *get_sticky_windows_sorted(MAIN_WINDOW_REC *mainwin)
void mainwindow_change_active(MAIN_WINDOW_REC *mainwin,
WINDOW_REC *skip_window)
{
WINDOW_REC *window;
WINDOW_REC *window, *other;
GSList *tmp;
mainwin->active = NULL;
@ -149,16 +149,21 @@ void mainwindow_change_active(MAIN_WINDOW_REC *mainwin,
}
}
other = NULL;
for (tmp = windows; tmp != NULL; tmp = tmp->next) {
WINDOW_REC *rec = tmp->data;
if (rec != skip_window && WINDOW_MAIN(rec) != mainwin) {
window_set_active(rec);
break;
if (rec != skip_window) {
if (WINDOW_MAIN(rec) == mainwin) {
window_set_active(rec);
return;
}
other = rec;
}
}
/* no more non-sticky windows, remove main window */
/* no more non-sticky windows, remove main window */
window_set_active(other);
mainwindow_destroy(mainwin);
}