mirror of
https://github.com/irssi/irssi.git
synced 2026-08-22 18:12:12 +02:00
Reuse the windows when restoring a saved layout
This allows us to use the 'layout restore' signal even when there are some windows open.
This commit is contained in:
parent
10cea61696
commit
32c81ec87d
1 changed files with 7 additions and 3 deletions
|
|
@ -183,11 +183,15 @@ static void sig_layout_restore(void)
|
||||||
CONFIG_NODE *node = tmp->data;
|
CONFIG_NODE *node = tmp->data;
|
||||||
if (node->key == NULL) continue;
|
if (node->key == NULL) continue;
|
||||||
|
|
||||||
|
/* let's reuse the existing windows when possible */
|
||||||
|
window = window_find_refnum(atoi(node->key));
|
||||||
|
if (window == NULL) {
|
||||||
/* create a new window + mainwindow */
|
/* create a new window + mainwindow */
|
||||||
signal_emit("gui window create override", 1,
|
signal_emit("gui window create override", 1,
|
||||||
GINT_TO_POINTER(0));
|
GINT_TO_POINTER(0));
|
||||||
|
|
||||||
window = window_create(NULL, TRUE);
|
window = window_create(NULL, TRUE);
|
||||||
|
}
|
||||||
window_set_refnum(window, atoi(node->key));
|
window_set_refnum(window, atoi(node->key));
|
||||||
|
|
||||||
if (lower_size > 0)
|
if (lower_size > 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue