summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsabetts <sabetts>2001-02-27 03:56:06 +0000
committersabetts <sabetts>2001-02-27 03:56:06 +0000
commit754b72f96a7931913a1e281da3d92843843c7fb6 (patch)
treeb5aa8e882e4226773c50275a28e08c70af1b24e1 /src
parentd81f46e77d6f6c0ce351765a1a778cdad9be592a (diff)
downloadratpoison-754b72f96a7931913a1e281da3d92843843c7fb6.zip
(save_mouse_position): stores the mouse position relative
to the root window. (set_active_window): warps the mouse relative to the root window.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/list.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ab2ea77..30ef558 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
2001-02-26 shawn <sabetts@diggin.lamenet.tmp>
+ * list.c (save_mouse_position): stores the mouse position relative
+ to the root window.
+ (set_active_window): warps the mouse relative to the root window.
+
* actions.h: prototype for force_maximize added
* actions.c: the user command "maximize" calls force_maximize
diff --git a/src/list.c b/src/list.c
index e15d416..ca79794 100644
--- a/src/list.c
+++ b/src/list.c
@@ -367,7 +367,7 @@ save_mouse_position (rp_window *win)
ignore_badwindow = 1;
XQueryPointer (dpy, win->w, &root_win, &child_win,
- &win_x, &win_y, &win->mouse_x, &win->mouse_y, &mask);
+ &win->mouse_x, &win->mouse_y, &win_x, &win_y, &mask);
ignore_badwindow = 0;
}
@@ -391,7 +391,8 @@ set_active_window (rp_window *rp_w)
save_mouse_position (rp_current_window);
}
- XWarpPointer (dpy, None, rp_w->w, 0, 0, 0, 0, rp_w->mouse_x, rp_w->mouse_y);
+ XWarpPointer (dpy, None, rp_w->scr->root,
+ 0, 0, 0, 0, rp_w->mouse_x, rp_w->mouse_y);
XSync (dpy, False);
XSetInputFocus (dpy, rp_w->w,