diff options
-rw-r--r-- | riscos/gui.c | 4 | ||||
-rw-r--r-- | riscos/url_complete.c | 12 | ||||
-rw-r--r-- | riscos/url_complete.h | 2 |
3 files changed, 10 insertions, 8 deletions
diff --git a/riscos/gui.c b/riscos/gui.c index b135f824d..0f64d0e80 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -800,7 +800,7 @@ void ro_gui_null_reason_code(void) if (gui_track_wimp_w == history_window) ro_gui_history_mouse_at(&pointer); if (gui_track_wimp_w == dialog_url_complete) - ro_gui_url_complete_mouse_at(&pointer); + ro_gui_url_complete_mouse_at(&pointer, false); else if (gui_track_gui_window) ro_gui_window_mouse_at(gui_track_gui_window, &pointer); } @@ -946,7 +946,7 @@ void ro_gui_mouse_click(wimp_pointer *pointer) else if (pointer->w == history_window) ro_gui_history_click(pointer); else if (pointer->w == dialog_url_complete) - ro_gui_url_complete_mouse_at(pointer); + ro_gui_url_complete_mouse_at(pointer, true); else if ((hotlist_tree) && (pointer->w == (wimp_w)hotlist_tree->handle)) ro_gui_hotlist_click(pointer); else if ((global_history_tree) && (pointer->w == (wimp_w)global_history_tree->handle)) diff --git a/riscos/url_complete.c b/riscos/url_complete.c index 6fc319527..56ae55e7a 100644 --- a/riscos/url_complete.c +++ b/riscos/url_complete.c @@ -499,8 +499,11 @@ void ro_gui_url_complete_redraw(wimp_draw *redraw) { /** * Handle mouse movements/clicks over the URL completion window. + * + * \param pointer the pointer state + * \param buttons whethere to react to mouse buttons */ -void ro_gui_url_complete_mouse_at(wimp_pointer *pointer) { +void ro_gui_url_complete_mouse_at(wimp_pointer *pointer, bool buttons) { wimp_window_state state; os_error *error; int selection, old_selection; @@ -553,9 +556,9 @@ void ro_gui_url_complete_mouse_at(wimp_pointer *pointer) { warn_user("WimpError", error->errmess); } } - + /* Select sets the text and launches */ - if (pointer->buttons == wimp_CLICK_SELECT) { + if ((pointer->buttons == wimp_CLICK_SELECT) && (buttons)) { g = ro_gui_window_lookup(url_complete_parent); if (!g) return; @@ -567,10 +570,9 @@ void ro_gui_url_complete_mouse_at(wimp_pointer *pointer) { 0); global_history_add_recent(url_complete_matches[url_complete_matches_selection]); ro_gui_url_complete_close(NULL, 0); - } /* Adjust just sets the text */ - if (pointer->buttons == wimp_CLICK_ADJUST) { + } else if ((pointer->buttons == wimp_CLICK_ADJUST) && (buttons)) { g = ro_gui_window_lookup(url_complete_parent); if (!g) return; diff --git a/riscos/url_complete.h b/riscos/url_complete.h index 1d894b9aa..9a192de2b 100644 --- a/riscos/url_complete.h +++ b/riscos/url_complete.h @@ -20,7 +20,7 @@ bool ro_gui_url_complete_keypress(struct gui_window *g, int key); void ro_gui_url_complete_resize(struct gui_window *g, wimp_open *open); bool ro_gui_url_complete_close(struct gui_window *g, wimp_i i); void ro_gui_url_complete_redraw(wimp_draw *redraw); -void ro_gui_url_complete_mouse_at(wimp_pointer *pointer); +void ro_gui_url_complete_mouse_at(wimp_pointer *pointer, bool buttons); void url_complete_dump_matches(const char *url); |