summaryrefslogtreecommitdiff
path: root/src/list.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2002-11-20 09:06:12 +0000
committersabetts <sabetts>2002-11-20 09:06:12 +0000
commit94c5b929a7c3e0f84499210b97093a3015151100 (patch)
treeaa936e07612be6b858709ea6242e610e7c2ba58f /src/list.c
parentc2ffdb2c8f4bb27811cda997371732967321cb82 (diff)
downloadratpoison-94c5b929a7c3e0f84499210b97093a3015151100.zip
* src/main.c (init_defaults): set pointer warping to on by
default. * src/list.c (give_window_focus): only warp the pointer if the warp setting is turned on. * src/data.h (struct rp_defaults): new member, warp. * src/actions.h (cmd_ward): new prototype * src/actions.c (user_command): new command "warp" (cmd_warp): new function
Diffstat (limited to 'src/list.c')
-rw-r--r--src/list.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/list.c b/src/list.c
index a78eb57..a2370d3 100644
--- a/src/list.c
+++ b/src/list.c
@@ -444,8 +444,10 @@ give_window_focus (rp_window *win, rp_window *last_win)
/* Warp the cursor to the window's saved position. */
if (last_win != NULL) save_mouse_position (last_win);
- XWarpPointer (dpy, None, win->scr->root,
- 0, 0, 0, 0, win->mouse_x, win->mouse_y);
+
+ if (defaults.warp)
+ XWarpPointer (dpy, None, win->scr->root,
+ 0, 0, 0, 0, win->mouse_x, win->mouse_y);
/* Swap colormaps */
if (last_win != NULL) XUninstallColormap (dpy, last_win->colormap);