tweaks: swap the row and col parameters to a more consistent order
parent
90ebff00ca
commit
f5c87a7fee
|
@ -121,7 +121,7 @@ char *do_browser(char *path)
|
||||||
int mouse_x, mouse_y;
|
int mouse_x, mouse_y;
|
||||||
|
|
||||||
/* We can click on the edit window to select a filename. */
|
/* 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)) {
|
wmouse_trafo(edit, &mouse_y, &mouse_x, FALSE)) {
|
||||||
/* longest is the width of each column. There
|
/* longest is the width of each column. There
|
||||||
* are two spaces between each column. */
|
* are two spaces between each column. */
|
||||||
|
|
|
@ -220,8 +220,8 @@ void do_help(void)
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_MOUSE
|
#ifdef ENABLE_MOUSE
|
||||||
} else if (kbinput == KEY_MOUSE) {
|
} else if (kbinput == KEY_MOUSE) {
|
||||||
int dummy_x, dummy_y;
|
int dummy_row, dummy_col;
|
||||||
get_mouseinput(&dummy_x, &dummy_y, TRUE);
|
get_mouseinput(&dummy_row, &dummy_col, TRUE);
|
||||||
#endif
|
#endif
|
||||||
} else if (func == do_exit) {
|
} else if (func == do_exit) {
|
||||||
/* Exit from the help viewer. */
|
/* Exit from the help viewer. */
|
||||||
|
|
|
@ -1565,7 +1565,7 @@ void unbound_key(int code)
|
||||||
int do_mouse(void)
|
int do_mouse(void)
|
||||||
{
|
{
|
||||||
int click_row, click_col;
|
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 the click is wrong or already handled, we're done. */
|
||||||
if (retval != 0)
|
if (retval != 0)
|
||||||
|
|
|
@ -33,7 +33,7 @@ static size_t statusbar_x = HIGHEST_POSITIVE;
|
||||||
int do_statusbar_mouse(void)
|
int do_statusbar_mouse(void)
|
||||||
{
|
{
|
||||||
int click_row, click_col;
|
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. */
|
/* We can click on the statusbar window text to move the cursor. */
|
||||||
if (retval == 0 && wmouse_trafo(bottomwin, &click_row, &click_col, FALSE)) {
|
if (retval == 0 && wmouse_trafo(bottomwin, &click_row, &click_col, FALSE)) {
|
||||||
|
|
|
@ -629,7 +629,7 @@ int get_control_kbinput(int kbinput);
|
||||||
int *get_verbatim_kbinput(WINDOW *win, size_t *kbinput_len);
|
int *get_verbatim_kbinput(WINDOW *win, size_t *kbinput_len);
|
||||||
int *parse_verbatim_kbinput(WINDOW *win, size_t *count);
|
int *parse_verbatim_kbinput(WINDOW *win, size_t *count);
|
||||||
#ifdef ENABLE_MOUSE
|
#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
|
#endif
|
||||||
const sc *get_shortcut(int *kbinput);
|
const sc *get_shortcut(int *kbinput);
|
||||||
void blank_row(WINDOW *win, int y, int x, int n);
|
void blank_row(WINDOW *win, int y, int x, int n);
|
||||||
|
|
|
@ -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.
|
* 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
|
* or 2 if it's been ignored. Assume that KEY_MOUSE has already been
|
||||||
* read in. */
|
* 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;
|
MEVENT mevent;
|
||||||
bool in_bottomwin;
|
bool in_bottomwin;
|
||||||
|
|
Loading…
Reference in New Issue