summaryrefslogtreecommitdiff
path: root/openbox/action.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-04-05 20:27:03 +0000
committerDana Jansens <danakj@orodu.net>2003-04-05 20:27:03 +0000
commitcbbf90a718ecc6836ef7a77b9040aebb9da348b8 (patch)
treea53bcdc993f850bc0500daaebd5b1bd0b7b50ee1 /openbox/action.c
parent88f8ebada97c4c82252badeb57b7e71a2940600b (diff)
change how rc parsing will work. a=b will be parsed in any [section] and given to a separate parsing callback. no more general config infrastructure needed/
Diffstat (limited to 'openbox/action.c')
-rw-r--r--openbox/action.c35
1 files changed, 33 insertions, 2 deletions
diff --git a/openbox/action.c b/openbox/action.c
index 7e0321bc..0e41e2eb 100644
--- a/openbox/action.c
+++ b/openbox/action.c
@@ -157,9 +157,16 @@ Action *action_from_string(char *name)
a = action_new(action_restart);
} else if (!g_ascii_strcasecmp(name, "exit")) {
a = action_new(action_exit);
- }
- else if (!g_ascii_strcasecmp(name, "showmenu")) {
+ } else if (!g_ascii_strcasecmp(name, "showmenu")) {
a = action_new(action_showmenu);
+ } else if (!g_ascii_strcasecmp(name, "nextwindowlinear")) {
+ a = action_new(action_cycle_windows);
+ a->data.cycle.linear = TRUE;
+ a->data.cycle.forward = TRUE;
+ } else if (!g_ascii_strcasecmp(name, "previouswindowlinear")) {
+ a = action_new(action_cycle_windows);
+ a->data.cycle.linear = TRUE;
+ a->data.cycle.forward = FALSE;
}
return a;
@@ -655,3 +662,27 @@ void action_showmenu(union ActionData *data)
{
g_message(__FUNCTION__);
}
+
+void action_cycle_windows(union ActionData *data)
+{
+ if (data->cycle.linear) {
+ if (!data->cycle.final) {
+ GList *it, *start;
+
+ start = it = g_list_find(client_list, data->cycle.c);
+ do {
+ if (data->cycle.forward) {
+ it = it->next;
+ if (it == NULL) it = client_list;
+ } else {
+ it = it->prev;
+ if (it == NULL) it = g_list_last(client_list);
+ }
+ if (client_focus(it->data))
+ break;
+ } while (it != start);
+ }
+ } else {
+ }
+}
+