diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2021-04-25 22:02:11 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2021-04-25 22:05:00 +0100 |
commit | 93b68a9a4869cac3ec4927b35f29cac32e106832 (patch) | |
tree | da5aa431459fc460b5e36778a0c3635c329d41a8 /frontends | |
parent | c5aca9d8cecd256d957c551229be2b6856875e25 (diff) | |
download | netsurf-93b68a9a4869cac3ec4927b35f29cac32e106832.tar.gz netsurf-93b68a9a4869cac3ec4927b35f29cac32e106832.tar.bz2 |
RISC OS: Corewindow: Fix autoscroll segfault when pointer leaves window.
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/riscos/corewindow.c | 10 | ||||
-rw-r--r-- | frontends/riscos/global_history.c | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/frontends/riscos/corewindow.c b/frontends/riscos/corewindow.c index 921671217..88bb5c3ef 100644 --- a/frontends/riscos/corewindow.c +++ b/frontends/riscos/corewindow.c @@ -52,6 +52,8 @@ #define wimp_KEY_END wimp_KEY_COPY #endif +static struct ro_corewindow *ro_cw_drag_cw; + /** * Update a windows scrollbars. * @@ -255,6 +257,11 @@ static void ro_cw_mouse_at(wimp_pointer *pointer, void *data) (unsigned int)pointer->w); return; } + if (ro_cw != ro_cw_drag_cw) { + NSLOG(netsurf, DEEPDEBUG, "Called without drag window: %p", + ro_cw); + return; + } NSLOG(netsurf, INFO, "RO corewindow context %p", ro_cw); /* Not a Menu click. */ @@ -391,6 +398,7 @@ ro_cw_drag_start(struct ro_corewindow *ro_cw, ro_warn_user("WimpError", error->errmess); } + ro_cw_drag_cw = ro_cw; ro_mouse_drag_start(ro_cw_drag_end, ro_cw_mouse_at, NULL, NULL); } } @@ -1046,6 +1054,8 @@ ro_corewindow_init(struct ro_corewindow *ro_cw, } /* setup context for event handlers */ + NSLOG(netsurf, INFO, "Setting corewindow %p for window handle %p", + ro_cw, ro_cw->wh); ro_gui_wimp_event_set_user_data(ro_cw->wh, ro_cw); /* register wimp events. */ diff --git a/frontends/riscos/global_history.c b/frontends/riscos/global_history.c index 4f0dbd48c..51f5390cb 100644 --- a/frontends/riscos/global_history.c +++ b/frontends/riscos/global_history.c @@ -444,6 +444,9 @@ static nserror ro_global_history_init(void) return res; } + NSLOG(netsurf, INFO, "Created global history corewindow: %p", + &ncwin->core); + res = global_history_init(ncwin->core.cb_table, (struct core_window *)ncwin); if (res != NSERROR_OK) { |