summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/curses/gui-display.c2
-rw-r--r--src/gui/gtk/gui-display.c2
-rw-r--r--src/gui/gui-common.c9
-rw-r--r--src/gui/gui.h2
4 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c
index ed0fdc53e..d30c5e6fa 100644
--- a/src/gui/curses/gui-display.c
+++ b/src/gui/curses/gui-display.c
@@ -1395,7 +1395,7 @@ gui_init ()
gui_init_colors ();
/* create a new window */
- gui_current_window = gui_window_new (NULL, NULL /*0, 0, COLS, LINES*/);
+ gui_current_window = gui_window_new (NULL, NULL, 1 /*0, 0, COLS, LINES*/);
signal (SIGWINCH, gui_curses_resize_handler);
diff --git a/src/gui/gtk/gui-display.c b/src/gui/gtk/gui-display.c
index 29c3a4690..ca183b3e7 100644
--- a/src/gui/gtk/gui-display.c
+++ b/src/gui/gtk/gui-display.c
@@ -625,7 +625,7 @@ gui_init ()
gtk_widget_show_all (gtk_main_window);
/* create a new window */
- gui_current_window = gui_window_new (NULL, NULL /*0, 0, COLS, LINES*/);
+ gui_current_window = gui_window_new (NULL, NULL, 1 /*0, 0, COLS, LINES*/);
/* TODO: set gui_ready to 1 when Gtk display functions will be ok */
gui_ready = 1;
diff --git a/src/gui/gui-common.c b/src/gui/gui-common.c
index 723c19fe5..8ec65ccc0 100644
--- a/src/gui/gui-common.c
+++ b/src/gui/gui-common.c
@@ -52,7 +52,7 @@ t_gui_window *gui_current_window = NULL; /* pointer to current window */
*/
t_gui_window *
-gui_window_new (void *server, void *channel
+gui_window_new (void *server, void *channel, int switch_to_window
/*int x, int y, int width, int height*/)
{
t_gui_window *new_window;
@@ -114,7 +114,8 @@ gui_window_new (void *server, void *channel
new_window->ptr_history = NULL;
/* switch to new window */
- gui_switch_to_window (new_window);
+ if (switch_to_window)
+ gui_switch_to_window (new_window);
/* add window to windows queue */
new_window->prev_window = last_gui_window;
@@ -126,7 +127,7 @@ gui_window_new (void *server, void *channel
new_window->next_window = NULL;
/* redraw whole screen */
- gui_redraw_window (new_window);
+ gui_redraw_window (gui_current_window);
}
else
return NULL;
@@ -235,7 +236,7 @@ gui_window_free (t_gui_window *window)
/* always at least one window */
if (!gui_windows && create_new)
- gui_window_new (NULL, NULL);
+ gui_window_new (NULL, NULL, 1);
}
/*
diff --git a/src/gui/gui.h b/src/gui/gui.h
index 370d09e91..d0fb54376 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -189,7 +189,7 @@ extern t_gui_window *gui_current_window;
/* prototypes */
/* GUI independent functions */
-extern t_gui_window *gui_window_new (void *, void * /*int, int, int, int*/); /* TODO: add coordinates and size */
+extern t_gui_window *gui_window_new (void *, void *, int /*int, int, int, int*/); /* TODO: add coordinates and size */
extern void gui_window_clear (t_gui_window *);
extern void gui_window_clear_all ();
extern t_gui_line *gui_new_line (t_gui_window *);