diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-01-08 21:49:45 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-01-08 21:49:45 +0000 |
commit | 6cc1619799b39016acea738c1ae7ea17d2588b9c (patch) | |
tree | 63c490f800930f83d129eadf8450d3309eab5052 /src/gui_x11.c | |
parent | 9588a0f72bc1f72962e3e327d29775d3a970e579 (diff) | |
download | vim-git-6cc1619799b39016acea738c1ae7ea17d2588b9c.tar.gz |
updated for version 7.0035v7.0035
Diffstat (limited to 'src/gui_x11.c')
-rw-r--r-- | src/gui_x11.c | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/src/gui_x11.c b/src/gui_x11.c index 88ee91c0c..6d990c5d1 100644 --- a/src/gui_x11.c +++ b/src/gui_x11.c @@ -3276,33 +3276,23 @@ gui_x11_callbacks(textArea, vimForm) } /* - * Get current y mouse coordinate in text window. - * Return -1 when unknown. + * Get current mouse coordinates in text window. */ - int -gui_mch_get_mouse_x() -{ - int rootx, rooty, winx, winy; - Window root, child; - unsigned int mask; - - if (gui.wid && XQueryPointer(gui.dpy, gui.wid, &root, &child, - &rootx, &rooty, &winx, &winy, &mask)) - return winx; - return -1; -} - - int -gui_mch_get_mouse_y() + void +gui_mch_getmouse(int *x, int *y) { int rootx, rooty, winx, winy; Window root, child; unsigned int mask; if (gui.wid && XQueryPointer(gui.dpy, gui.wid, &root, &child, - &rootx, &rooty, &winx, &winy, &mask)) - return winy; - return -1; + &rootx, &rooty, &winx, &winy, &mask)) { + *x = winx; + *y = winy; + } else { + *x = -1; + *y = -1; + } } void |