mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Fix broken display after resizing many windows very small
This commit is contained in:
parent
cdfd75da98
commit
76b934d18e
@ -520,7 +520,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);
|
g_return_if_fail(window != NULL);
|
||||||
|
|
||||||
@ -531,7 +531,7 @@ void mainwindow_destroy(MAIN_WINDOW_REC *window)
|
|||||||
|
|
||||||
if (mainwindows != NULL) {
|
if (mainwindows != NULL) {
|
||||||
gui_windows_remove_parent(window);
|
gui_windows_remove_parent(window);
|
||||||
if (!quitting) {
|
if (respace) {
|
||||||
mainwindows_add_space(window);
|
mainwindows_add_space(window);
|
||||||
mainwindows_redraw();
|
mainwindows_redraw();
|
||||||
}
|
}
|
||||||
@ -542,12 +542,14 @@ void mainwindow_destroy(MAIN_WINDOW_REC *window)
|
|||||||
if (active_mainwin == window) active_mainwin = NULL;
|
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)
|
void mainwindow_destroy_half(MAIN_WINDOW_REC *window)
|
||||||
{
|
{
|
||||||
int really_quitting = quitting;
|
mainwindow_destroy_full(window, FALSE);
|
||||||
quitting = TRUE;
|
|
||||||
mainwindow_destroy(window);
|
|
||||||
quitting = really_quitting;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mainwindows_redraw(void)
|
void mainwindows_redraw(void)
|
||||||
@ -821,6 +823,12 @@ void mainwindows_resize(int width, int height)
|
|||||||
mainwindows_resize_smaller(ydiff);
|
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);
|
signal_emit("terminal resized", 0);
|
||||||
|
|
||||||
irssi_redraw();
|
irssi_redraw();
|
||||||
|
Loading…
Reference in New Issue
Block a user