]> Dogcows Code - chaz/openbox/blobdiff - openbox/keyboard.c
add interactive action functions. some other changes to stuff that wasnt going to...
[chaz/openbox] / openbox / keyboard.c
index 9fd38def9452a03d1534cb3cef0a0ab2cedbcc47..18884991fea3c7e522819c71d3c691b036084bbe 100644 (file)
@@ -25,7 +25,7 @@
 #include "event.h"
 #include "grab.h"
 #include "client.h"
-#include "action.h"
+#include "actions.h"
 #include "prop.h"
 #include "menuframe.h"
 #include "config.h"
@@ -42,7 +42,7 @@ typedef struct {
     gboolean active;
     guint state;
     ObClient *client;
-    ObAction *action;
+    ObActionsAct *action;
 } ObInteractiveState;
 
 KeyBindingTree *keyboard_firstnode = NULL;
@@ -98,11 +98,12 @@ static void set_curpos(KeyBindingTree *newpos)
             g_free(oldtext);
         }
 
-        a = screen_physical_area_monitor_active();
+        a = screen_physical_area_active();
         popup_position(popup, NorthWestGravity, a->x + 10, a->y + 10);
         /* 1 second delay for the popup to show */
         popup_delay_show(popup, G_USEC_PER_SEC, text);
         g_free(text);
+        g_free(a);
     } else {
         popup_hide(popup);
     }
@@ -141,7 +142,7 @@ void keyboard_chroot(GList *keylist)
     }
 }
 
-gboolean keyboard_bind(GList *keylist, ObAction *action)
+gboolean keyboard_bind(GList *keylist, ObActionsAct *action)
 {
     KeyBindingTree *tree, *t;
     gboolean conflict;
@@ -168,14 +169,6 @@ gboolean keyboard_bind(GList *keylist, ObAction *action)
     /* find the bottom node */
     for (; t->first_child; t = t->first_child);
 
-    /* when there are no modifiers in the binding, then the action cannot
-       be interactive */
-    if (!t->state && action->data.any.interactive) {
-        g_print("not interactive\n");
-        action->data.any.interactive = FALSE;
-        action->data.inter.final = TRUE;
-    }
-
     /* set the action */
     t->actions = g_slist_append(t->actions, action);
     /* assimilate this built tree into the main tree. assimilation
@@ -188,6 +181,7 @@ gboolean keyboard_bind(GList *keylist, ObAction *action)
 static void keyboard_interactive_end(guint state, gboolean cancel, Time time,
                                      gboolean ungrab)
 {
+#if 0
     GSList *alist;
 
     g_assert(istate.active);
@@ -205,6 +199,7 @@ static void keyboard_interactive_end(guint state, gboolean cancel, Time time,
     g_slist_free(alist);
 
     keyboard_reset_chains(0);
+#endif
 }
 
 static void keyboard_interactive_end_client(ObClient *client, gpointer data)
@@ -220,8 +215,9 @@ void keyboard_interactive_cancel()
 }
 
 gboolean keyboard_interactive_grab(guint state, ObClient *client,
-                                   ObAction *action)
+                                   ObActionsAct *action)
 {
+#if 0
     g_assert(action->data.any.interactive);
 
     if (!istate.active) {
@@ -236,6 +232,7 @@ gboolean keyboard_interactive_grab(guint state, ObClient *client,
     istate.client = client;
     istate.action = action;
 
+#endif
     return TRUE;
 }
 
@@ -318,7 +315,7 @@ void keyboard_event(ObClient *client, const XEvent *e)
                 gboolean inter = FALSE;
 
                 for (it = p->actions; it && !inter; it = g_slist_next(it))
-                    if (((ObAction*)it->data)->data.any.interactive)
+                    if (((ObActionsAct*)it->data)->data.any.interactive)
                         inter = TRUE;
                 if (!inter) /* don't reset if the action is interactive */
                     keyboard_reset_chains(0);
This page took 0.027245 seconds and 4 git commands to generate.