#include "openbox/actions.h"
+#include "openbox/stacking.h"
+#include "openbox/window.h"
#include "openbox/event.h"
#include "openbox/focus_cycle.h"
#include "openbox/openbox.h"
gboolean desktop_windows;
gboolean all_desktops;
gboolean forward;
+ gboolean bar;
+ gboolean raise;
GSList *actions;
} Options;
o = g_new0(Options, 1);
o->dialog = TRUE;
+ o->bar = TRUE;
if ((n = parse_find_node("linear", node)))
o->linear = parse_bool(doc, n);
if ((n = parse_find_node("dialog", node)))
o->dialog = parse_bool(doc, n);
+ if ((n = parse_find_node("bar", node)))
+ o->bar = parse_bool(doc, n);
+ if ((n = parse_find_node("raise", node)))
+ o->raise = parse_bool(doc, n);
if ((n = parse_find_node("panels", node)))
o->dock_windows = parse_bool(doc, n);
if ((n = parse_find_node("desktop", node)))
static gboolean run_func(ObActionsData *data, gpointer options)
{
Options *o = options;
+ struct _ObClient *ft;
- focus_cycle(o->forward,
- o->all_desktops,
- o->dock_windows,
- o->desktop_windows,
- o->linear,
- TRUE,
- o->dialog,
- FALSE, FALSE);
+ ft = focus_cycle(o->forward,
+ o->all_desktops,
+ o->dock_windows,
+ o->desktop_windows,
+ o->linear,
+ TRUE,
+ o->bar,
+ o->dialog,
+ FALSE, FALSE);
cycling = TRUE;
+ stacking_restore();
+ if (o->raise) stacking_temp_raise(CLIENT_AS_WINDOW(ft));
+
return TRUE;
}
o->desktop_windows,
o->linear,
TRUE,
+ o->bar,
o->dialog,
TRUE, cancel);
cycling = FALSE;
if (ft)
actions_run_acts(o->actions, OB_USER_ACTION_KEYBOARD_KEY,
state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft);
+
+ stacking_restore();
}
#include "openbox/actions.h"
#include "openbox/event.h"
+#include "openbox/stacking.h"
+#include "openbox/window.h"
#include "openbox/focus_cycle.h"
#include "openbox/openbox.h"
#include "openbox/misc.h"
gboolean dock_windows;
gboolean desktop_windows;
ObDirection direction;
+ gboolean bar;
+ gboolean raise;
GSList *actions;
} Options;
o = g_new0(Options, 1);
o->dialog = TRUE;
+ o->bar = TRUE;
if ((n = parse_find_node("dialog", node)))
o->dialog = parse_bool(doc, n);
+ if ((n = parse_find_node("bar", node)))
+ o->bar = parse_bool(doc, n);
+ if ((n = parse_find_node("raise", node)))
+ o->raise = parse_bool(doc, n);
if ((n = parse_find_node("panels", node)))
o->dock_windows = parse_bool(doc, n);
if ((n = parse_find_node("desktop", node)))
if (!o->interactive)
end_cycle(FALSE, data->state, o);
else {
- focus_directional_cycle(o->direction,
- o->dock_windows,
- o->desktop_windows,
- TRUE,
- o->dialog,
- FALSE, FALSE);
+ struct _ObClient *ft;
+
+ ft = focus_directional_cycle(o->direction,
+ o->dock_windows,
+ o->desktop_windows,
+ TRUE,
+ o->bar,
+ o->dialog,
+ FALSE, FALSE);
cycling = TRUE;
+
+ stacking_restore();
+ if (o->raise) stacking_temp_raise(CLIENT_AS_WINDOW(ft));
}
return o->interactive;
o->dock_windows,
o->desktop_windows,
o->interactive,
+ o->bar,
o->dialog,
TRUE, cancel);
cycling = FALSE;
- if (ft) {
+ if (ft)
actions_run_acts(o->actions, OB_USER_ACTION_KEYBOARD_KEY,
state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, ft);
- }
+
+ stacking_restore();
}
focus_cycle_dock_windows,
focus_cycle_desktop_windows))
{
- focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE);
- focus_directional_cycle(0, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE);
+ focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,TRUE);
+ focus_directional_cycle(0, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE);
}
}
ObClient* focus_cycle(gboolean forward, gboolean all_desktops,
gboolean dock_windows, gboolean desktop_windows,
gboolean linear, gboolean interactive,
- gboolean dialog, gboolean done, gboolean cancel)
+ gboolean showbar, gboolean dialog,
+ gboolean done, gboolean cancel)
{
static ObClient *t = NULL;
static GList *order = NULL;
if (interactive) {
if (ft != focus_cycle_target) { /* prevents flicker */
focus_cycle_target = ft;
- focus_cycle_draw_indicator(ft);
+ focus_cycle_draw_indicator(showbar ? ft : NULL);
}
if (dialog)
/* same arguments as focus_target_valid */
ObClient* focus_directional_cycle(ObDirection dir, gboolean dock_windows,
gboolean desktop_windows,
gboolean interactive,
- gboolean dialog,
+ gboolean showbar, gboolean dialog,
gboolean done, gboolean cancel)
{
static ObClient *first = NULL;
focus_cycle_target = ft;
if (!interactive)
goto done_cycle;
- focus_cycle_draw_indicator(ft);
+ focus_cycle_draw_indicator(showbar ? ft : NULL);
}
if (focus_cycle_target && dialog)
/* same arguments as focus_target_valid */
struct _ObClient* focus_cycle(gboolean forward, gboolean all_desktops,
gboolean dock_windows, gboolean desktop_windows,
gboolean linear, gboolean interactive,
- gboolean dialog, gboolean done, gboolean cancel);
+ gboolean showbar, gboolean dialog,
+ gboolean done, gboolean cancel);
struct _ObClient* focus_directional_cycle(ObDirection dir,
gboolean dock_windows,
gboolean desktop_windows,
gboolean interactive,
+ gboolean showbar,
gboolean dialog,
gboolean done, gboolean cancel);
static RrAppearance *a_focus_indicator;
static RrColor *color_white;
+static gboolean visible;
static Window create_window(Window parent, gulong mask,
XSetWindowAttributes *attrib)
{
XSetWindowAttributes attr;
+ visible = FALSE;
+
if (reconfig) return;
focus_indicator.top.obwin.type = Window_Internal;
void focus_cycle_draw_indicator(ObClient *c)
{
- if (!c) {
+ if (!c && visible) {
gulong ignore_start;
/* kill enter events cause by this unmapping */
XUnmapWindow(ob_display, focus_indicator.bottom.win);
event_end_ignore_all_enters(ignore_start);
- } else {
+
+ visible = FALSE;
+ }
+ else if (c) {
/*
if (c)
frame_adjust_focus(c->frame, FALSE);
XMapWindow(ob_display, focus_indicator.left.win);
XMapWindow(ob_display, focus_indicator.right.win);
XMapWindow(ob_display, focus_indicator.bottom.win);
+
+ visible = TRUE;
}
}