diff options
author | Steve Fryatt <steve@stevefryatt.org.uk> | 2011-12-17 23:25:06 +0000 |
---|---|---|
committer | Steve Fryatt <steve@stevefryatt.org.uk> | 2011-12-17 23:25:06 +0000 |
commit | 1631f3a4cb0aa87122e227f7b427c71402d1e65e (patch) | |
tree | 154846f16d7cd619253ae869c2fbba2f7bfc5907 | |
parent | b61670510f8136ea12f0d63ec5f560b64750b24c (diff) | |
download | netsurf-1631f3a4cb0aa87122e227f7b427c71402d1e65e.tar.gz netsurf-1631f3a4cb0aa87122e227f7b427c71402d1e65e.tar.bz2 |
Don't allow framesets to scroll out of view.
svn path=/trunk/netsurf/; revision=13291
-rw-r--r-- | riscos/window.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/riscos/window.c b/riscos/window.c index 45c862eb1..22c12c637 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -1618,6 +1618,16 @@ void ro_gui_window_open(wimp_open *open) /* first resize stops any flickering by making the URL window on top */ ro_gui_url_complete_resize(g->toolbar, PTR_WIMP_OPEN(&state)); + /* Windows containing framesets can only be scrolled via the core, which + * is implementing frame scrollbars itself. The x and y offsets are + * therefore fixed. + */ + + if (g->bw->children != NULL) { + state.xscroll = 0; + state.yscroll = toolbar_height; + } + error = xwimp_open_window_nested_with_flags(&state, parent, linkage); if (error) { LOG(("xwimp_open_window: 0x%x: %s", @@ -3105,9 +3115,12 @@ void ro_gui_window_scroll_action(struct gui_window *g, handled = browser_window_scroll_at_point(g->bw, pos.x, pos.y, step_x / 2, -step_y / 2); - /* If the core didn't do the scrolling, handle it via the Wimp. */ + /* If the core didn't do the scrolling, handle it via the Wimp. + * Windows which contain frames can only be scrolled by the core, + * because it implements frame scroll bars. + */ - if (!handled) { + if (!handled && g->bw->children == NULL) { state.xscroll += step_x; state.yscroll += step_y; |