summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2004-04-03 12:36:48 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2004-04-03 12:36:48 +0000
commit0a31d736c23bd1753631ef610eb760c1ea5cf571 (patch)
tree22c98935ff3a48d8a3cef7ddf29abbcefd1991f5
parentad07b6e656f36d41028e68c0e0f99eb34bfb8fc8 (diff)
downloadnetsurf-0a31d736c23bd1753631ef610eb760c1ea5cf571.tar.gz
netsurf-0a31d736c23bd1753631ef610eb760c1ea5cf571.tar.bz2
[project @ 2004-04-03 12:36:48 by jmb]
Add fixed offset when opening new windows. svn path=/import/netsurf/; revision=711
-rw-r--r--riscos/window.c8
1 files changed, 6 insertions, 2 deletions
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);