From c6eea438ac6698f60bc4c7f1d490db1c599f5488 Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Sun, 4 Sep 2022 09:28:54 +0100 Subject: [PATCH] RISC OS: Allow text selection in URL bar (RO5.28 onwards) --- frontends/riscos/gui/url_bar.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontends/riscos/gui/url_bar.c b/frontends/riscos/gui/url_bar.c index 8802db731..99a90f58a 100644 --- a/frontends/riscos/gui/url_bar.c +++ b/frontends/riscos/gui/url_bar.c @@ -351,9 +351,12 @@ static bool ro_gui_url_bar_icon_update(struct url_bar *url_bar) if (url_bar->display) { icon.icon.flags |= (wimp_BUTTON_NEVER << wimp_ICON_BUTTON_TYPE_SHIFT); - } else { + } else if (!ns_wimp_has_text_selection()) { icon.icon.flags |= (wimp_BUTTON_WRITE_CLICK_DRAG << wimp_ICON_BUTTON_TYPE_SHIFT); + } else { + icon.icon.flags |= (wimp_BUTTON_WRITABLE << + wimp_ICON_BUTTON_TYPE_SHIFT); } error = xwimp_create_icon(&icon, &url_bar->text.icon); if (error) {