commit f5c87a7fee9d11510c884b0b4608e6f0e6d88d78
parent 90ebff00cabe0307c8475a4128da48c2d7d85dc0
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 27 Jan 2018 20:00:14 +0100
tweaks: swap the row and col parameters to a more consistent order
Diffstat:
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/browser.c b/src/browser.c
@@ -121,7 +121,7 @@ char *do_browser(char *path)
int mouse_x, mouse_y;
/* We can click on the edit window to select a filename. */
- if (get_mouseinput(&mouse_x, &mouse_y, TRUE) == 0 &&
+ if (get_mouseinput(&mouse_y, &mouse_x, TRUE) == 0 &&
wmouse_trafo(edit, &mouse_y, &mouse_x, FALSE)) {
/* longest is the width of each column. There
* are two spaces between each column. */
diff --git a/src/help.c b/src/help.c
@@ -220,8 +220,8 @@ void do_help(void)
#endif
#ifdef ENABLE_MOUSE
} else if (kbinput == KEY_MOUSE) {
- int dummy_x, dummy_y;
- get_mouseinput(&dummy_x, &dummy_y, TRUE);
+ int dummy_row, dummy_col;
+ get_mouseinput(&dummy_row, &dummy_col, TRUE);
#endif
} else if (func == do_exit) {
/* Exit from the help viewer. */
diff --git a/src/nano.c b/src/nano.c
@@ -1565,7 +1565,7 @@ void unbound_key(int code)
int do_mouse(void)
{
int click_row, click_col;
- int retval = get_mouseinput(&click_col, &click_row, TRUE);
+ int retval = get_mouseinput(&click_row, &click_col, TRUE);
/* If the click is wrong or already handled, we're done. */
if (retval != 0)
diff --git a/src/prompt.c b/src/prompt.c
@@ -33,7 +33,7 @@ static size_t statusbar_x = HIGHEST_POSITIVE;
int do_statusbar_mouse(void)
{
int click_row, click_col;
- int retval = get_mouseinput(&click_col, &click_row, TRUE);
+ int retval = get_mouseinput(&click_row, &click_col, TRUE);
/* We can click on the statusbar window text to move the cursor. */
if (retval == 0 && wmouse_trafo(bottomwin, &click_row, &click_col, FALSE)) {
diff --git a/src/proto.h b/src/proto.h
@@ -629,7 +629,7 @@ int get_control_kbinput(int kbinput);
int *get_verbatim_kbinput(WINDOW *win, size_t *kbinput_len);
int *parse_verbatim_kbinput(WINDOW *win, size_t *count);
#ifdef ENABLE_MOUSE
-int get_mouseinput(int *mouse_x, int *mouse_y, bool allow_shortcuts);
+int get_mouseinput(int *mouse_row, int *mouse_col, bool allow_shortcuts);
#endif
const sc *get_shortcut(int *kbinput);
void blank_row(WINDOW *win, int y, int x, int n);
diff --git a/src/winio.c b/src/winio.c
@@ -1597,7 +1597,7 @@ int *parse_verbatim_kbinput(WINDOW *win, size_t *count)
* it's been handled by putting back keystrokes that need to be handled.
* or 2 if it's been ignored. Assume that KEY_MOUSE has already been
* read in. */
-int get_mouseinput(int *mouse_x, int *mouse_y, bool allow_shortcuts)
+int get_mouseinput(int *mouse_y, int *mouse_x, bool allow_shortcuts)
{
MEVENT mevent;
bool in_bottomwin;