mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Merge pull request #947 from ailin-nemui/rsplit-collapse
Fix broken display after resizing many windows very small
This commit is contained in:
commit
7ab52e73c6
@ -525,7 +525,7 @@ static void gui_windows_remove_parent(MAIN_WINDOW_REC *window)
|
||||
}
|
||||
}
|
||||
|
||||
void mainwindow_destroy(MAIN_WINDOW_REC *window)
|
||||
static void mainwindow_destroy_full(MAIN_WINDOW_REC *window, int respace)
|
||||
{
|
||||
g_return_if_fail(window != NULL);
|
||||
|
||||
@ -536,7 +536,7 @@ void mainwindow_destroy(MAIN_WINDOW_REC *window)
|
||||
|
||||
if (mainwindows != NULL) {
|
||||
gui_windows_remove_parent(window);
|
||||
if (!quitting) {
|
||||
if (respace) {
|
||||
mainwindows_add_space(window);
|
||||
mainwindows_redraw();
|
||||
}
|
||||
@ -547,12 +547,14 @@ void mainwindow_destroy(MAIN_WINDOW_REC *window)
|
||||
if (active_mainwin == window) active_mainwin = NULL;
|
||||
}
|
||||
|
||||
void mainwindow_destroy(MAIN_WINDOW_REC *window)
|
||||
{
|
||||
mainwindow_destroy_full(window, !quitting);
|
||||
}
|
||||
|
||||
void mainwindow_destroy_half(MAIN_WINDOW_REC *window)
|
||||
{
|
||||
int really_quitting = quitting;
|
||||
quitting = TRUE;
|
||||
mainwindow_destroy(window);
|
||||
quitting = really_quitting;
|
||||
mainwindow_destroy_full(window, FALSE);
|
||||
}
|
||||
|
||||
void mainwindows_redraw(void)
|
||||
@ -826,6 +828,12 @@ void mainwindows_resize(int width, int height)
|
||||
mainwindows_resize_smaller(ydiff);
|
||||
}
|
||||
|
||||
/* if we lost our active mainwin, get a new one */
|
||||
if (active_mainwin == NULL && !quitting) {
|
||||
active_mainwin = WINDOW_MAIN(active_win);
|
||||
window_set_active(active_mainwin->active);
|
||||
}
|
||||
|
||||
signal_emit("terminal resized", 0);
|
||||
|
||||
irssi_redraw();
|
||||
|
Loading…
Reference in New Issue
Block a user