diff options
author | sabetts <sabetts> | 2005-10-22 06:38:14 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2005-10-22 06:38:14 +0000 |
commit | fbdf3d4ae819ea9d9342ccc17d6d649495e4e7da (patch) | |
tree | dea5217ba916946e8760163206bffa4fcf4a1e7a | |
parent | c7b7f18ea8e839f142688ad2f2fa3e3b128abfad (diff) | |
download | ratpoison-fbdf3d4ae819ea9d9342ccc17d6d649495e4e7da.zip |
(get_mouse_position): renamed from
get_mouse_root_position. get pos relative to window.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/window.c | 10 |
2 files changed, 10 insertions, 5 deletions
@@ -1,3 +1,8 @@ +2005-10-22 Shawn Betts <sabetts@shitbender.gagrod> + + * src/window.c (get_mouse_position): renamed from + get_mouse_root_position. get pos relative to window. + 2005-10-20 Shawn Betts <sabetts@shitbender.gagrod> * src/window.c: include unistd.h diff --git a/src/window.c b/src/window.c index 04220dc..8105dca 100644 --- a/src/window.c +++ b/src/window.c @@ -31,15 +31,15 @@ LIST_HEAD(rp_mapped_window); struct numset *rp_window_numset; -/* Get the mouse position relative to the root of the specified window */ +/* Get the mouse position relative to the the specified window */ static void -get_mouse_root_position (rp_window *win, int *mouse_x, int *mouse_y) +get_mouse_position (rp_window *win, int *mouse_x, int *mouse_y) { Window root_win, child_win; - int win_x, win_y; + int root_x, root_y; unsigned int mask; - XQueryPointer (dpy, win->scr->root, &root_win, &child_win, &win_x, &win_y, mouse_x, mouse_y, &mask); + XQueryPointer (dpy, win->scr->root, &root_win, &child_win, mouse_x, mouse_y, &root_x, &root_y, &mask); } void @@ -189,7 +189,7 @@ add_to_window_list (rp_screen *s, Window w) update_window_gravity (new_window); - get_mouse_root_position (new_window, &new_window->mouse_x, &new_window->mouse_y); + get_mouse_position (new_window, &new_window->mouse_x, &new_window->mouse_y); XSelectInput (dpy, new_window->w, WIN_EVENTS); |