]> Dogcows Code - chaz/openbox/blobdiff - openbox/action.c
make ob_exit() take an error code. don't exit with 0 for signals other than TERM...
[chaz/openbox] / openbox / action.c
index 6d1e0a645c9f068b2f3c4635d46807fe084892ee..d394b95b793a6b9c3d6a506b81a7d54bbc1ed3ce 100644 (file)
@@ -698,6 +698,9 @@ ObAction *action_from_string(char *name, ObUserAction uact)
             a = action_new(actionstrings[i].func, uact);
             if (actionstrings[i].setup)
                 actionstrings[i].setup(&a, uact);
+            /* only key bindings can be interactive. thus saith the xor. */
+            if (uact != OB_USER_ACTION_KEYBOARD_KEY)
+                a->data.any.interactive = FALSE;
             break;
         }
     if (!exist)
@@ -720,7 +723,7 @@ ObAction *action_parse(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
             if (act->func == action_execute || act->func == action_restart) {
                 if ((n = parse_find_node("execute", node->xmlChildrenNode))) {
                     gchar *s = parse_string(doc, n);
-                    act->data.execute.path = ob_expand_tilde(s);
+                    act->data.execute.path = parse_expand_tilde(s);
                     g_free(s);
                 }
             } else if (act->func == action_showmenu) {
@@ -764,7 +767,6 @@ ObAction *action_parse(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
 }
 
 void action_run_full(ObAction *a, struct _ObClient *c,
-                     ObFrameContext context,
                      guint state, guint button, gint x, gint y,
                      gboolean cancel, gboolean done)
 {
@@ -781,7 +783,7 @@ void action_run_full(ObAction *a, struct _ObClient *c,
         a->data.inter.cancel = cancel;
         a->data.inter.final = done;
         if (!(cancel || done))
-            keyboard_interactive_grab(state, c, context, a);
+            keyboard_interactive_grab(state, c, a);
     }
 
     a->func(&a->data);
@@ -798,6 +800,7 @@ void action_execute(union ActionData *data)
                 g_warning("failed to execute '%s': %s",
                           cmd, e->message);
             }
+            g_free(cmd);
         } else {
             g_warning("failed to convert '%s' from utf8", data->execute.path);
         }
@@ -1164,7 +1167,7 @@ void action_restart(union ActionData *data)
 
 void action_exit(union ActionData *data)
 {
-    ob_exit();
+    ob_exit(0);
 }
 
 void action_showmenu(union ActionData *data)
@@ -1229,11 +1232,12 @@ void action_growtoedge(union ActionData *data)
 {
     int x, y, width, height, dest;
     ObClient *c = data->diraction.any.c;
-    Rect *a = screen_area(c->desktop);
+    Rect *a;
 
     if (!c)
         return;
     
+    a = screen_area(c->desktop);
     x = c->frame->area.x;
     y = c->frame->area.y;
     width = c->frame->area.width;
This page took 0.022231 seconds and 4 git commands to generate.