--- data/rc.xsd.orig 2006-09-10 09:20:52.000000000 +0100
+++ data/rc.xsd 2006-09-10 09:20:56.000000000 +0100
@@ -165,6 +165,7 @@
+
--- openbox/action.c.orig 2006-09-10 09:21:13.000000000 +0100
+++ openbox/action.c 2006-09-10 09:24:04.000000000 +0100
@@ -293,6 +293,7 @@
(*a)->data.cycle.linear = FALSE;
(*a)->data.cycle.forward = TRUE;
(*a)->data.cycle.dialog = TRUE;
+ (*a)->data.cycle.docks = FALSE;
}
void setup_action_cycle_windows_previous(ObAction **a, ObUserAction uact)
@@ -934,6 +935,8 @@
act->data.cycle.linear = parse_bool(doc, n);
if ((n = parse_find_node("dialog", node->xmlChildrenNode)))
act->data.cycle.dialog = parse_bool(doc, n);
+ if ((n = parse_find_node("docks", node->xmlChildrenNode)))
+ act->data.cycle.docks = parse_bool(doc, n);
} else if (act->func == action_directional_focus) {
if ((n = parse_find_node("dialog", node->xmlChildrenNode)))
act->data.cycle.dialog = parse_bool(doc, n);
@@ -1527,7 +1530,7 @@
event_halt_focus_delay();
focus_cycle(data->cycle.forward, data->cycle.linear, data->any.interactive,
- data->cycle.dialog,
+ data->cycle.dialog, data->cycle.docks,
data->cycle.inter.final, data->cycle.inter.cancel);
}
--- openbox/focus.c.orig 2006-09-10 09:24:13.000000000 +0100
+++ openbox/focus.c 2006-09-10 09:47:30.000000000 +0100
@@ -58,7 +58,7 @@
{
/* end cycling if the target disappears */
if (focus_cycle_target == client)
- focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE);
+ focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE);
}
static Window createWindow(Window parent, gulong mask,
@@ -192,7 +192,7 @@
/* in the middle of cycling..? kill it. */
if (focus_cycle_target)
- focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE);
+ focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE);
old = focus_client;
focus_client = client;
@@ -507,18 +507,21 @@
}
}
-static gboolean valid_focus_target(ObClient *ft)
+static gboolean valid_focus_target(ObClient *ft, gboolean docks)
{
/* we don't use client_can_focus here, because that doesn't let you
focus an iconic window, but we want to be able to, so we just check
if the focus flags on the window allow it, and its on the current
desktop */
- if ((ft->type == OB_CLIENT_TYPE_NORMAL ||
+ if (((!docks &&
+ (ft->type == OB_CLIENT_TYPE_NORMAL ||
ft->type == OB_CLIENT_TYPE_DIALOG ||
(!client_has_group_siblings(ft) &&
(ft->type == OB_CLIENT_TYPE_TOOLBAR ||
ft->type == OB_CLIENT_TYPE_MENU ||
- ft->type == OB_CLIENT_TYPE_UTILITY))) &&
+ ft->type == OB_CLIENT_TYPE_UTILITY)))) ||
+ (docks &&
+ ft->type == OB_CLIENT_TYPE_DOCK)) &&
((ft->can_focus || ft->focus_notify) &&
!ft->skip_taskbar &&
(ft->desktop == screen_desktop || ft->desktop == DESKTOP_ALL)) &&
@@ -542,7 +545,7 @@
}
void focus_cycle(gboolean forward, gboolean linear, gboolean interactive,
- gboolean dialog, gboolean done, gboolean cancel)
+ gboolean dialog, gboolean docks, gboolean done, gboolean cancel)
{
static ObClient *first = NULL;
static ObClient *t = NULL;
@@ -585,7 +588,7 @@
if (it == NULL) it = g_list_last(list);
}
ft = it->data;
- if (valid_focus_target(ft)) {
+ if (valid_focus_target(ft,docks)) {
if (interactive) {
if (ft != focus_cycle_target) { /* prevents flicker */
focus_cycle_target = ft;
@@ -646,7 +649,7 @@
GList *it;
for (it = focus_order[screen_desktop]; it; it = g_list_next(it))
- if (valid_focus_target(it->data))
+ if (valid_focus_target(it->data,FALSE))
ft = it->data;
}
--- openbox/action.h.orig 2006-09-10 09:47:38.000000000 +0100
+++ openbox/action.h 2006-09-10 09:47:58.000000000 +0100
@@ -136,6 +136,7 @@
gboolean linear;
gboolean forward;
gboolean dialog;
+ gboolean docks;
};
struct Stacking {
--- openbox/focus.h.orig 2006-09-10 09:48:08.000000000 +0100
+++ openbox/focus.h 2006-09-10 09:48:47.000000000 +0100
@@ -60,7 +60,7 @@
/*! Cycle focus amongst windows. */
void focus_cycle(gboolean forward, gboolean linear, gboolean interactive,
- gboolean dialog, gboolean done, gboolean cancel);
+ gboolean dialog, gboolean docks, gboolean done, gboolean cancel);
void focus_directional_cycle(ObDirection dir, gboolean interactive,
gboolean dialog, gboolean done, gboolean cancel);
void focus_cycle_draw_indicator();