mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -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:
parent
ac8109ac9e
commit
6a1f6b560f
@ -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) {
|
||||
if (rec != skip_window) {
|
||||
if (WINDOW_MAIN(rec) == mainwin) {
|
||||
window_set_active(rec);
|
||||
break;
|
||||
return;
|
||||
}
|
||||
other = rec;
|
||||
}
|
||||
}
|
||||
|
||||
/* no more non-sticky windows, remove main window */
|
||||
window_set_active(other);
|
||||
mainwindow_destroy(mainwin);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user