From 94c5b929a7c3e0f84499210b97093a3015151100 Mon Sep 17 00:00:00 2001 From: sabetts Date: Wed, 20 Nov 2002 09:06:12 +0000 Subject: * 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 --- src/list.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/list.c') 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); -- cgit v1.2.3