mirror of
https://github.com/irssi/irssi.git
synced 2026-08-22 10:02:22 +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;
|
||||
if (node->key == NULL) continue;
|
||||
|
||||
/* create a new window + mainwindow */
|
||||
signal_emit("gui window create override", 1,
|
||||
/* let's reuse the existing windows when possible */
|
||||
window = window_find_refnum(atoi(node->key));
|
||||
if (window == NULL) {
|
||||
/* create a new window + mainwindow */
|
||||
signal_emit("gui window create override", 1,
|
||||
GINT_TO_POINTER(0));
|
||||
|
||||
window = window_create(NULL, TRUE);
|
||||
window = window_create(NULL, TRUE);
|
||||
}
|
||||
window_set_refnum(window, atoi(node->key));
|
||||
|
||||
if (lower_size > 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue