gboolean linear;
gboolean dock_windows;
gboolean desktop_windows;
+ gboolean only_hilite_windows;
gboolean all_desktops;
gboolean forward;
gboolean bar;
o->raise = obt_xml_node_bool(n);
if ((n = obt_xml_find_node(node, "panels")))
o->dock_windows = obt_xml_node_bool(n);
+ if ((n = obt_xml_find_node(node, "hilite")))
+ o->only_hilite_windows = obt_xml_node_bool(n);
if ((n = obt_xml_find_node(node, "desktop")))
o->desktop_windows = obt_xml_node_bool(n);
if ((n = obt_xml_find_node(node, "allDesktops")))
ft = focus_cycle(o->forward,
o->all_desktops,
+ !o->only_hilite_windows,
o->dock_windows,
o->desktop_windows,
o->linear,
ft = focus_cycle(o->forward,
o->all_desktops,
+ !o->only_hilite_windows,
o->dock_windows,
o->desktop_windows,
o->linear,
/* this checks for focus=false for the window */
(!settings || settings->focus != 0) &&
focus_valid_target(self, self->desktop,
- FALSE, FALSE, TRUE, FALSE, FALSE,
+ FALSE, FALSE, TRUE, TRUE, FALSE, FALSE,
settings->focus == 1))
{
activate = TRUE;
for (it = focus_order; it; it = g_list_next(it)) {
ObClient *c = it->data;
if (focus_valid_target(c, desktop,
- TRUE, TRUE, FALSE, FALSE, FALSE, FALSE))
+ TRUE, TRUE,
+ FALSE, TRUE, FALSE, FALSE, FALSE))
{
empty = FALSE;
for (it = focus_order; it; it = g_list_next(it)) {
ObClient *c = it->data;
if (focus_valid_target(c, d->desktop,
- TRUE, TRUE, FALSE, FALSE, FALSE, FALSE)) {
+ TRUE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE)) {
ObMenuEntry *e;
empty = FALSE;
*/
if ((allow_omnipresent || c->desktop == screen_desktop) &&
focus_valid_target(c, screen_desktop,
- TRUE, FALSE, FALSE, FALSE, FALSE, FALSE) &&
+ TRUE, FALSE, FALSE, TRUE, FALSE, FALSE,
+ FALSE) &&
!c->shaded &&
(allow_refocus || client_focus_target(c) != old) &&
client_focus(c))
backup fallback though)
*/
if (focus_valid_target(c, screen_desktop,
- TRUE, FALSE, FALSE, FALSE, TRUE, FALSE) &&
+ TRUE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE) &&
(allow_refocus || client_focus_target(c) != old) &&
client_focus(c))
{
if (c != ft && c->type == OB_CLIENT_TYPE_NORMAL &&
focus_valid_target(c, screen_desktop,
TRUE, iconic_windows, all_desktops,
- FALSE, FALSE, FALSE))
+ TRUE, FALSE, FALSE, FALSE))
{
return TRUE;
}
gboolean helper_windows,
gboolean iconic_windows,
gboolean all_desktops,
+ gboolean nonhilite_windows,
gboolean dock_windows,
gboolean desktop_windows,
gboolean user_request)
ok = (all_desktops || ft->desktop == desktop ||
ft->desktop == DESKTOP_ALL);
+ /* if we only include hilited windows, check if the window is */
+ ok = ok && (nonhilite_windows || ft->demands_attention);
+
/* the window can receive focus somehow */
ok = ok && (ft->can_focus || ft->focus_notify);
TRUE,
iconic_windows,
all_desktops,
+ nonhilite_windows,
dock_windows,
desktop_windows,
FALSE));
gboolean helper_windows,
gboolean iconic_windows,
gboolean all_desktops,
+ gboolean nonhilite_windows,
gboolean dock_windows,
gboolean desktop_windows,
gboolean user_request);
static ObCycleType focus_cycle_type = OB_CYCLE_NONE;
static gboolean focus_cycle_iconic_windows;
static gboolean focus_cycle_all_desktops;
+static gboolean focus_cycle_nonhilite_windows;
static gboolean focus_cycle_dock_windows;
static gboolean focus_cycle_desktop_windows;
TRUE);
focus_cycle_update_indicator(focus_cycle_target);
if (!focus_cycle_target)
- focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE,
+ focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
TRUE, TRUE, TRUE, TRUE, TRUE);
}
}
ObClient* focus_cycle(gboolean forward, gboolean all_desktops,
+ gboolean nonhilite_windows,
gboolean dock_windows, gboolean desktop_windows,
gboolean linear, gboolean interactive,
gboolean showbar, ObFocusCyclePopupMode mode,
if (focus_cycle_target == NULL) {
focus_cycle_iconic_windows = TRUE;
focus_cycle_all_desktops = all_desktops;
+ focus_cycle_nonhilite_windows = nonhilite_windows;
focus_cycle_dock_windows = dock_windows;
focus_cycle_desktop_windows = desktop_windows;
start = it = g_list_find(list, focus_client);
focus_cycle_draw_indicator(showbar ? ft : NULL);
}
/* same arguments as focus_target_valid */
- focus_cycle_popup_show(ft,
- focus_cycle_iconic_windows,
- focus_cycle_all_desktops,
- focus_cycle_dock_windows,
- focus_cycle_desktop_windows,
- mode);
+ focus_cycle_popup_show(ft, mode);
return focus_cycle_target;
} else if (ft != focus_cycle_target) {
focus_cycle_target = ft;
if (focus_cycle_target == NULL) {
focus_cycle_iconic_windows = FALSE;
focus_cycle_all_desktops = FALSE;
+ focus_cycle_nonhilite_windows = TRUE;
focus_cycle_dock_windows = dock_windows;
focus_cycle_desktop_windows = desktop_windows;
}
}
if (focus_cycle_target && dialog)
/* same arguments as focus_target_valid */
- focus_cycle_popup_single_show(focus_cycle_target,
- focus_cycle_iconic_windows,
- focus_cycle_all_desktops,
- focus_cycle_dock_windows,
- focus_cycle_desktop_windows);
+ focus_cycle_popup_single_show(focus_cycle_target);
return focus_cycle_target;
done_cycle:
return focus_valid_target(client, screen_desktop, TRUE,
focus_cycle_iconic_windows,
focus_cycle_all_desktops,
+ focus_cycle_nonhilite_windows,
focus_cycle_dock_windows,
focus_cycle_desktop_windows,
FALSE);
/*! Cycle focus amongst windows. */
struct _ObClient* focus_cycle(gboolean forward, gboolean all_desktops,
+ gboolean nonhilite_windows,
gboolean dock_windows, gboolean desktop_windows,
gboolean linear, gboolean interactive,
gboolean showbar, ObFocusCyclePopupMode mode,
XFlush(obt_display);
}
-void focus_cycle_popup_show(ObClient *c, gboolean iconic_windows,
- gboolean all_desktops, gboolean dock_windows,
- gboolean desktop_windows,
- ObFocusCyclePopupMode mode)
+void focus_cycle_popup_show(ObClient *c, ObFocusCyclePopupMode mode)
{
g_assert(c != NULL);
popup_cleanup();
}
-void focus_cycle_popup_single_show(struct _ObClient *c,
- gboolean iconic_windows,
- gboolean all_desktops,
- gboolean dock_windows,
- gboolean desktop_windows)
+void focus_cycle_popup_single_show(struct _ObClient *c)
{
gchar *text;
void focus_cycle_popup_startup(gboolean reconfig);
void focus_cycle_popup_shutdown(gboolean reconfig);
-void focus_cycle_popup_show(struct _ObClient *c, gboolean iconic_windows,
- gboolean all_desktops, gboolean dock_windows,
- gboolean desktop_windows,
- ObFocusCyclePopupMode mode);
+void focus_cycle_popup_show(struct _ObClient *c, ObFocusCyclePopupMode mode);
void focus_cycle_popup_hide(void);
-void focus_cycle_popup_single_show(struct _ObClient *c,
- gboolean iconic_windows,
- gboolean all_desktops,
- gboolean dock_windows,
- gboolean desktop_windows);
+void focus_cycle_popup_single_show(struct _ObClient *c);
void focus_cycle_popup_single_hide(void);
gboolean focus_cycle_popup_is_showing(struct _ObClient *c);