* Fixed focus actions when bound to the mouse, normal focus cycle is always
linear and directional focus is totally disabled, it makes no sense
anyway, just move the mouse.
+ * Added an option for the raise/lower/raiselower/unshaderaise/shadelower
+ options called group that lets you bind stuff to raise/lower the whole
+ window group. <action name="raise"><group>yes</group></action>
* Various bug fixes. (I always wanted to write this in a changelog)
3.2:
} else if (act->func == action_directional_focus) {
if ((n = parse_find_node("dialog", node->xmlChildrenNode)))
act->data.cycle.dialog = parse_bool(doc, n);
+ } else if (act->func == action_raise ||
+ act->func == action_lower ||
+ act->func == action_raiselower ||
+ act->func == action_shadelower ||
+ act->func == action_unshaderaise) {
+ if ((n = parse_find_node("group", node->xmlChildrenNode)))
+ act->data.stacking.group = parse_bool(doc, n);
}
INTERACTIVE_LIMIT(act, uact);
}
void action_raise(union ActionData *data)
{
client_action_start(data);
- stacking_raise(CLIENT_AS_WINDOW(data->client.any.c));
+ stacking_raise(CLIENT_AS_WINDOW(data->client.any.c), data->stacking.group);
client_action_end(data);
}
void action_lower(union ActionData *data)
{
client_action_start(data);
- stacking_lower(CLIENT_AS_WINDOW(data->client.any.c));
+ stacking_lower(CLIENT_AS_WINDOW(data->client.any.c), data->stacking.group);
client_action_end(data);
}
gboolean dialog;
};
+struct Stacking {
+ struct AnyAction any;
+ gboolean group;
+};
+
union ActionData {
struct AnyAction any;
struct InteractiveAction inter;
struct ShowMenu showmenu;
struct CycleWindows cycle;
struct Layer layer;
+ struct Stacking stacking;
};
struct _ObAction {
switch (e->type) {
case ButtonPress:
if (e->xbutton.button == 1)
- stacking_raise(DOCK_AS_WINDOW(s));
+ stacking_raise(DOCK_AS_WINDOW(s), FALSE);
else if (e->xbutton.button == 2)
- stacking_lower(DOCK_AS_WINDOW(s));
+ stacking_lower(DOCK_AS_WINDOW(s), FALSE);
break;
case EnterNotify:
dock_hide(FALSE);
if (!self->mapped) {
XMapWindow(ob_display, self->bg);
- stacking_raise(INTERNAL_AS_WINDOW(self));
+ stacking_raise(INTERNAL_AS_WINDOW(self), FALSE);
self->mapped = TRUE;
}
}
}
static GList *pick_group_windows(ObClient *top, ObClient *selected,
- gboolean raise)
+ gboolean raise, gboolean normal)
{
GList *ret = NULL;
GList *it, *next, *prev;
c->desktop == DESKTOP_ALL) &&
(t == OB_CLIENT_TYPE_TOOLBAR ||
t == OB_CLIENT_TYPE_MENU ||
- t == OB_CLIENT_TYPE_UTILITY))
+ t == OB_CLIENT_TYPE_UTILITY ||
+ (normal && t == OB_CLIENT_TYPE_NORMAL)))
{
ret = g_list_concat(ret,
pick_windows(sit->data,
return ret;
}
-void stacking_raise(ObWindow *window)
+void stacking_raise(ObWindow *window, gboolean group)
{
GList *wins;
selected = WINDOW_AS_CLIENT(window);
c = client_search_top_transient(selected);
wins = pick_windows(c, selected, TRUE);
- wins = g_list_concat(wins, pick_group_windows(c, selected, TRUE));
+ wins = g_list_concat(wins, pick_group_windows(c, selected, TRUE, group));
} else {
wins = g_list_append(NULL, window);
stacking_list = g_list_remove(stacking_list, window);
g_list_free(wins);
}
-void stacking_lower(ObWindow *window)
+void stacking_lower(ObWindow *window, gboolean group)
{
GList *wins;
selected = WINDOW_AS_CLIENT(window);
c = client_search_top_transient(selected);
wins = pick_windows(c, selected, FALSE);
- wins = g_list_concat(pick_group_windows(c, selected, FALSE), wins);
+ wins = g_list_concat(pick_group_windows(c, selected, FALSE, group), wins);
} else {
wins = g_list_append(NULL, window);
stacking_list = g_list_remove(stacking_list, window);
GList *wins;
g_assert(screen_support_win != None); /* make sure I dont break this in the
- future */
+ future */
l = window_layer(win);
wins = g_list_append(NULL, win); /* list of 1 element */
stacking_list = g_list_append(stacking_list, win);
- stacking_raise(win);
+ stacking_raise(win, FALSE);
}
void stacking_add_nonintrusive(ObWindow *win)
#define stacking_remove(win) stacking_list = g_list_remove(stacking_list, win);
/*! Raises a window above all others in its stacking layer */
-void stacking_raise(ObWindow *window);
+void stacking_raise(ObWindow *window, gboolean group);
/*! Lowers a window below all others in its stacking layer */
-void stacking_lower(ObWindow *window);
+void stacking_lower(ObWindow *window, gboolean group);
/*! Moves a window below another if its in the same layer.
This function does not enforce stacking rules IRT transients n such, and so