From 301122057283400dda30cd8ed04c7b7b69e4a912 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 9 Dec 2009 10:32:36 -0500 Subject: Set a minimum value for the screenEdgeWarpTime for 25ms. 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'openbox/config.c') diff --git a/openbox/config.c b/openbox/config.c index 96fdd0f4..9b6c2028 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -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) { -- cgit v1.2.3 From aa329719b99792a624449b2448abee9e2c67ce94 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 9 Dec 2009 16:41:52 -0500 Subject: Add a primaryMonitor config option, where the focus-cycle and keychain popups will appear --- openbox/config.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'openbox/config.c') diff --git a/openbox/config.c b/openbox/config.c index 9b6c2028..73302dfd 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -40,6 +40,9 @@ ObPlacePolicy config_place_policy; gboolean config_place_center; ObPlaceMonitor config_place_monitor; +guint config_primary_monitor_index; +ObPlaceMonitor config_primary_monitor; + StrutPartial config_margins; gchar *config_theme; @@ -529,6 +532,13 @@ static void parse_placement(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, else if (parse_contains("mouse", doc, n)) config_place_monitor = OB_PLACE_MONITOR_MOUSE; } + if ((n = parse_find_node("primaryMonitor", node))) { + config_primary_monitor_index = parse_int(doc, n); + if (!config_primary_monitor_index) { + if (parse_contains("mouse", doc, n)) + config_primary_monitor = OB_PLACE_MONITOR_MOUSE; + } + } } static void parse_margins(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, @@ -931,6 +941,9 @@ void config_startup(ObParseInst *i) config_place_center = TRUE; config_place_monitor = OB_PLACE_MONITOR_ANY; + config_primary_monitor_index = 1; + config_primary_monitor = OB_PLACE_MONITOR_ACTIVE; + parse_register(i, "placement", parse_placement, NULL); STRUT_PARTIAL_SET(config_margins, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -- cgit v1.2.3