]> Dogcows Code - chaz/openbox/commitdiff
Set a minimum value for the screenEdgeWarpTime for 25ms.
authorDana Jansens <danakj@orodu.net>
Wed, 9 Dec 2009 15:32:36 +0000 (10:32 -0500)
committerDana Jansens <danakj@orodu.net>
Wed, 9 Dec 2009 15:32:36 +0000 (10:32 -0500)
When this is very small it just gives X/Openbox a heart attack and ends up going forever.  Even 25 is quite too fast to be usuable so it should be a good minimum.

openbox/config.c

index 96fdd0f4082b30df0338c21b5fb39d69d1a7ec89..9b6c20285784eaf6c782618df8a2fb80f5af679f 100644 (file)
@@ -444,8 +444,13 @@ static void parse_mouse(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
         config_mouse_threshold = parse_int(doc, n);
     if ((n = parse_find_node("doubleClickTime", node)))
         config_mouse_dclicktime = parse_int(doc, n);
-    if ((n = parse_find_node("screenEdgeWarpTime", node)))
+    if ((n = parse_find_node("screenEdgeWarpTime", node))) {
         config_mouse_screenedgetime = parse_int(doc, n);
+        /* minimum value of 25 for this property, when it is 1 and you hit the
+           edge it basically never stops */
+        if (config_mouse_screenedgetime && config_mouse_screenedgetime < 25)
+            config_mouse_screenedgetime = 25;
+    }
 
     n = parse_find_node("context", node);
     while (n) {
This page took 0.023526 seconds and 4 git commands to generate.