summaryrefslogtreecommitdiff
path: root/frontends/riscos/gui/url_bar.c
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/riscos/gui/url_bar.c')
-rw-r--r--frontends/riscos/gui/url_bar.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/frontends/riscos/gui/url_bar.c b/frontends/riscos/gui/url_bar.c
index 15aab3ea5..99a90f58a 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"
@@ -350,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) {
@@ -983,11 +987,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)) {
@@ -1503,7 +1509,7 @@ ro_gui_url_bar_set_content_favicon(struct url_bar *url_bar,
struct gui_window *g)
{
int type = 0;
- char sprite[URLBAR_FAVICON_NAME_LENGTH];
+ char sprite[URLBAR_FAVICON_NAME_LENGTH-1];
struct hlcache_handle *h;
if (url_bar == NULL ||