]> Dogcows Code - chaz/openbox/blobdiff - openbox/actions.c
save the state of the modifiers only when starting an interactive action
[chaz/openbox] / openbox / actions.c
index 945233e63fae1f71ba5f826e539012dd298354cd..463962a25c26410a91f63f7874e3e9cb787f6af8 100644 (file)
@@ -102,7 +102,7 @@ ObActionsDefinition* do_register(const gchar *name,
             return NULL;
     }
 
-    def = g_new(ObActionsDefinition, 1);
+    def = g_slice_new(ObActionsDefinition);
     def->ref = 1;
     def->name = g_strdup(name);
     def->free = free;
@@ -164,7 +164,7 @@ static void actions_definition_unref(ObActionsDefinition *def)
 {
     if (def && --def->ref == 0) {
         g_free(def->name);
-        g_free(def);
+        g_slice_free(ObActionsDefinition, def);
     }
 }
 
@@ -184,7 +184,7 @@ static ObActionsAct* actions_build_act_from_string(const gchar *name)
 
     /* if we found the action */
     if (def) {
-        act = g_new(ObActionsAct, 1);
+        act = g_slice_new(ObActionsAct);
         act->ref = 1;
         act->def = def;
         actions_definition_ref(act->def);
@@ -268,7 +268,7 @@ void actions_act_unref(ObActionsAct *act)
             act->def->free(act->options);
         /* unref the definition */
         actions_definition_unref(act->def);
-        g_free(act);
+        g_slice_free(ObActionsAct, act);
     }
 }
 
@@ -368,7 +368,7 @@ static gboolean actions_interactive_begin_act(ObActionsAct *act, guint state)
         interactive_act = act;
         actions_act_ref(interactive_act);
 
-        interactive_initial_state = state;
+        interactive_initial_state = obt_keyboard_only_modmasks(state);
 
         /* if using focus_delay, stop the timer now so that focus doesn't go
            moving on us, which would kill the action */
This page took 0.021318 seconds and 4 git commands to generate.