summaryrefslogtreecommitdiff
path: root/openbox/focus.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2010-01-11 12:47:59 -0500
committerDana Jansens <danakj@orodu.net>2010-01-11 12:47:59 -0500
commit12653a4153bccd5d9a46998753e7a1bc17479505 (patch)
tree908a1f8891306e42b055ca167530cf0195136647 /openbox/focus.c
parentd3a01a40f35cb3ae6c5ad8329291e86e2e599691 (diff)
Redraw the focus cycle popup when the list of focusable windows changes, rather than closing it
Diffstat (limited to 'openbox/focus.c')
-rw-r--r--openbox/focus.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/openbox/focus.c b/openbox/focus.c
index a0e9c666..c82c4f62 100644
--- a/openbox/focus.c
+++ b/openbox/focus.c
@@ -98,6 +98,9 @@ void focus_set_client(ObClient *client)
PROP_SET32(RootWindow(ob_display, ob_screen),
net_active_window, window, active);
}
+
+ /* make sure the focus cycle popup shows things in the right order */
+ focus_cycle_reorder();
}
static ObClient* focus_fallback_target(gboolean allow_refocus,
@@ -206,16 +209,14 @@ void focus_order_add_new(ObClient *c)
focus_order = g_list_insert(focus_order, c, 1);
}
- /* in the middle of cycling..? kill it. */
- focus_cycle_stop(c);
+ focus_cycle_add(c);
}
void focus_order_remove(ObClient *c)
{
focus_order = g_list_remove(focus_order, c);
- /* in the middle of cycling..? kill it. */
- focus_cycle_stop(c);
+ focus_cycle_remove(c);
}
void focus_order_to_top(ObClient *c)
@@ -293,6 +294,9 @@ gboolean focus_valid_target(ObClient *ft,
{
gboolean ok = FALSE;
+ /* see if the window is still managed or is going away */
+ if (!ft->managed) return FALSE;
+
/* it's on this desktop unless you want all desktops.
do this check first because it will usually filter out the most