diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2020-11-03 09:54:22 +0000 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2020-11-03 09:55:26 +0000 |
commit | 3cead4e8670b4ceb3f5010bd2aaac5d5aa0bd009 (patch) | |
tree | 24257fad28338c590e6560c165e6639f96e78edd /frontends | |
parent | f8eabec04b5c5823b405440561add3cc47282f11 (diff) | |
download | netsurf-3cead4e8670b4ceb3f5010bd2aaac5d5aa0bd009.tar.gz netsurf-3cead4e8670b4ceb3f5010bd2aaac5d5aa0bd009.tar.bz2 |
risc os: Don't swallow URL bar drags if the OS supports text-selection.
It should still be possible to drag save the URL from the favicon.
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/riscos/gui/url_bar.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/frontends/riscos/gui/url_bar.c b/frontends/riscos/gui/url_bar.c index 15aab3ea5..63193a43f 100644 --- a/frontends/riscos/gui/url_bar.c +++ b/frontends/riscos/gui/url_bar.c @@ -40,6 +40,7 @@ #include "riscos/url_suggest.h" #include "riscos/wimp.h" #include "riscos/wimp_event.h" +#include "riscos/wimputils.h" #include "riscos/window.h" #include "riscos/ucstables.h" #include "riscos/filetype.h" @@ -983,11 +984,13 @@ ro_gui_url_bar_click(struct url_bar *url_bar, */ if (pointer->buttons == wimp_DRAG_SELECT || pointer->buttons == wimp_DRAG_ADJUST) { - if (pointer->i == url_bar->text.icon) { - if (action != NULL) { - *action = TOOLBAR_URL_DRAG_URL; + if (ns_wimp_has_text_selection()) { + if (pointer->i == url_bar->text.icon) { + if (action != NULL) { + *action = TOOLBAR_URL_DRAG_URL; + } + return true; } - return true; } if (is_point_in_box(&pos, &url_bar->favicon.extent)) { |