From: Charles McGarvey Date: Wed, 28 Dec 2011 20:34:27 +0000 (-0700) Subject: Prevent screen edge warping from switching rapidly X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=c8d98d2586a22bdaaa20859c4d5db1bbf632a533;p=chaz%2Fopenbox Prevent screen edge warping from switching rapidly In the case that screenEdgeWarpMouse is true and screenEdgeWarpTime is a low number, the workspace could switch back and forth rapidly while warping until the mouse leaves the edge. This patch just moves the cursor an extra pixel, off of the screen edge, when warping the mouse. --- diff --git a/openbox/moveresize.c b/openbox/moveresize.c index 3a98db37..d700da9e 100644 --- a/openbox/moveresize.c +++ b/openbox/moveresize.c @@ -583,16 +583,16 @@ static void edge_warp_move_ptr(void) switch (edge_warp_dir) { case OB_DIRECTION_NORTH: - y = a->height - 1; + y = a->height - 2; break; case OB_DIRECTION_EAST: - x = a->x; + x = a->x + 1; break; case OB_DIRECTION_SOUTH: - y = a->y; + y = a->y + 1; break; case OB_DIRECTION_WEST: - x = a->width - 1; + x = a->width - 2; break; default: g_assert_not_reached();