]> Dogcows Code - chaz/openbox/blobdiff - plugins/focus.c
yet more improvements to focus handling
[chaz/openbox] / plugins / focus.c
index da76e98c808c7ac98ef83af464b6e55f01155d81..17ab20ef40915d974991698043ec7c07bab191f6 100644 (file)
@@ -19,7 +19,7 @@ void plugin_setup_config()
     config_set("focus.followMouse", Config_Bool, val);
     config_def_set(config_def_new("focus.focusNew", Config_Bool,
                                   "Focus New Windows",
-                                  "Focus windows when they first appear "));
+                                  "Focus windows when they first appear."));
     val.bool = TRUE;
     config_set("focus.focusNew", Config_Bool, val);
 /*
@@ -118,14 +118,14 @@ static void focus_desktop()
 static void event(ObEvent *e, void *foo)
 {
     ConfigValue follow_mouse, focus_new;
-    gboolean r;
     
-    r = config_get("focus.followMouse", Config_Bool, &follow_mouse);
-    g_assert(r);
+    if (!config_get("focus.followMouse", Config_Bool, &follow_mouse))
+        g_assert_not_reached();
 
     switch (e->type) {
     case Event_Client_Mapped:
-        r = config_get("focus.focusNew", Config_Bool, &focus_new);
+        if (!config_get("focus.focusNew", Config_Bool, &focus_new))
+            g_assert_not_reached();
         if (focus_new.bool && client_normal(e->data.c.client))
             client_focus(e->data.c.client);
         break;
This page took 0.022119 seconds and 4 git commands to generate.