summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
Diffstat (limited to 'riscos')
-rw-r--r--riscos/gui.c2
-rw-r--r--riscos/save.h5
-rw-r--r--riscos/window.c24
3 files changed, 15 insertions, 16 deletions
diff --git a/riscos/gui.c b/riscos/gui.c
index 7742008dd..3fd113c93 100644
--- a/riscos/gui.c
+++ b/riscos/gui.c
@@ -438,7 +438,7 @@ static void ro_gui_signal(int sig)
#else
/* Save WimpSlot and UnixLib managed DAs when UnixEnv$coredump
* defines a coredump directory. */
- _kernel_oserror *err = __unixlib_write_coredump (NULL);
+ const _kernel_oserror *err = __unixlib_write_coredump (NULL);
if (err != NULL)
LOG(("Coredump failed: %s", err->errmess));
#endif
diff --git a/riscos/save.h b/riscos/save.h
index 08bdc17ec..dba09a984 100644
--- a/riscos/save.h
+++ b/riscos/save.h
@@ -27,6 +27,7 @@
#include "oslib/wimp.h"
enum gui_save_type;
+struct nsurl;
void gui_drag_save_object(struct gui_window *g, struct hlcache_handle *c, enum gui_save_type save_type);
void gui_drag_save_selection(struct gui_window *g, const char *selection);
@@ -34,10 +35,10 @@ void gui_drag_save_selection(struct gui_window *g, const char *selection);
wimp_w ro_gui_saveas_create(const char *template_name);
void ro_gui_saveas_quit(void);
void ro_gui_save_prepare(enum gui_save_type save_type, struct hlcache_handle *h,
- char *s, const nsurl *url,
+ char *s, const struct nsurl *url,
const char *title);
void ro_gui_save_start_drag(wimp_pointer *pointer);
-void ro_gui_drag_save_link(enum gui_save_type save_type, const nsurl *url,
+void ro_gui_drag_save_link(enum gui_save_type save_type, const struct nsurl *url,
const char *title, struct gui_window *g);
void ro_gui_drag_icon(int x, int y, const char *sprite);
void ro_gui_drag_box_cancel(void);
diff --git a/riscos/window.c b/riscos/window.c
index f6ebf14d4..6a2ae4467 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -4878,9 +4878,10 @@ browser_mouse_state ro_gui_mouse_click_state(wimp_mouse_state buttons,
/* Need to consider what we have and decide whether to fire
* triple click instead */
- switch (state) {
- case BROWSER_MOUSE_PRESS_1 | BROWSER_MOUSE_CLICK_1:
- case BROWSER_MOUSE_PRESS_2 | BROWSER_MOUSE_CLICK_2:
+ if ((state == (BROWSER_MOUSE_PRESS_1 |
+ BROWSER_MOUSE_CLICK_1)) ||
+ (state == (BROWSER_MOUSE_PRESS_2 |
+ BROWSER_MOUSE_CLICK_2))) {
/* WIMP told us single click, but maybe we want to call
* it a triple click */
@@ -4899,12 +4900,12 @@ browser_mouse_state ro_gui_mouse_click_state(wimp_mouse_state buttons,
/* Single click */
last_click.type = CLICK_SINGLE;
}
- break;
-
- case BROWSER_MOUSE_PRESS_1 | BROWSER_MOUSE_CLICK_1 |
- BROWSER_MOUSE_DOUBLE_CLICK:
- case BROWSER_MOUSE_PRESS_2 | BROWSER_MOUSE_CLICK_2 |
- BROWSER_MOUSE_DOUBLE_CLICK:
+ } else if ((state == (BROWSER_MOUSE_PRESS_1 |
+ BROWSER_MOUSE_CLICK_1 |
+ BROWSER_MOUSE_DOUBLE_CLICK)) ||
+ (state == (BROWSER_MOUSE_PRESS_2 |
+ BROWSER_MOUSE_CLICK_2 |
+ BROWSER_MOUSE_DOUBLE_CLICK))) {
/* Wimp told us double click, but we may want to
* call it single click */
@@ -4915,11 +4916,8 @@ browser_mouse_state ro_gui_mouse_click_state(wimp_mouse_state buttons,
last_click.type = CLICK_DOUBLE;
last_click.time = wallclock();
}
- break;
-
- default:
+ } else {
last_click.type = CLICK_SINGLE;
- break;
}
break;
}