From c8d98d2586a22bdaaa20859c4d5db1bbf632a533 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Wed, 28 Dec 2011 13:34:27 -0700 Subject: [PATCH] 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. --- openbox/moveresize.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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(); -- 2.44.0