From 0a31d736c23bd1753631ef610eb760c1ea5cf571 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 3 Apr 2004 12:36:48 +0000 Subject: [project @ 2004-04-03 12:36:48 by jmb] Add fixed offset when opening new windows. svn path=/import/netsurf/; revision=711 --- riscos/window.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'riscos/window.c') diff --git a/riscos/window.c b/riscos/window.c index df99589af..07b449d87 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -32,6 +32,7 @@ #include "netsurf/utils/utils.h" gui_window *window_list = 0; +static int window_count = 0; /** * Checks if a window still exists. @@ -76,8 +77,8 @@ gui_window *gui_create_browser_window(struct browser_window *bw) win_width = 1600; win_height = win_width * 3 / 4; - window.visible.x0 = (screen_width - win_width) / 2; - window.visible.y0 = (screen_height - win_height) / 2; + window.visible.x0 = ((screen_width - win_width) / 2) + (48 * window_count); + window.visible.y0 = ((screen_height - win_height) / 2) - (48 * window_count); window.visible.x1 = window.visible.x0 + win_width; window.visible.y1 = window.visible.y0 + win_height; window.xscroll = 0; @@ -129,6 +130,7 @@ gui_window *gui_create_browser_window(struct browser_window *bw) g->next = window_list; window_list = g; + window_count++; state.w = g->window; wimp_get_window_state(&state); @@ -194,6 +196,8 @@ void gui_window_destroy(gui_window* g) gg->next = g->next; } + window_count--; + xwimp_delete_window(g->window); if (g->data.browser.toolbar) xwimp_delete_window(g->data.browser.toolbar); -- cgit v1.2.3