]> Dogcows Code - chaz/openbox/commitdiff
Prevent screen edge warping from switching rapidly
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 28 Dec 2011 20:34:27 +0000 (13:34 -0700)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 28 Dec 2011 20:34:27 +0000 (13:34 -0700)
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

index 3a98db37b8442849301e412f759a69f8d9e8f1fe..d700da9ebd66a0ecacb8d10c4e15bc0a2b75c4f2 100644 (file)
@@ -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();
This page took 0.023737 seconds and 4 git commands to generate.