X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus.c;h=c30d0e613ffaff3d03c348f975aaa34856a785ac;hb=a098c2437e96d58c647559b46278bc92954e9bbe;hp=dfa9c42dc93ee648157820906d78cc03d8d2b3ab;hpb=5be0a82a353b67160142134de1cc51fa31d72759;p=chaz%2Fopenbox diff --git a/openbox/focus.c b/openbox/focus.c index dfa9c42d..c30d0e61 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -19,11 +19,11 @@ #include ObClient *focus_client; -GList **focus_order = NULL; /* these lists are created when screen_startup - sets the number of desktops */ +GList **focus_order; /* these lists are created when screen_startup + sets the number of desktops */ -static ObClient *focus_cycle_target = NULL; -static Popup *focus_cycle_popup = NULL; +static ObClient *focus_cycle_target; +static Popup *focus_cycle_popup; void focus_startup() { @@ -240,7 +240,7 @@ static void popup_cycle(ObClient *c, gboolean show) */ /* XXX the size and the font extents need to be related on some level */ - popup_size(focus_cycle_popup, 320, 48); + popup_size(focus_cycle_popup, POPUP_WIDTH, POPUP_HEIGHT); /* use the transient's parent's title/icon */ while (p->transient_for && p->transient_for != OB_TRAN_GROUP) @@ -262,7 +262,7 @@ static void popup_cycle(ObClient *c, gboolean show) } ObClient *focus_cycle(gboolean forward, gboolean linear, gboolean done, - gboolean cancel) + gboolean cancel) { static ObClient *first = NULL; static ObClient *t = NULL; @@ -278,11 +278,9 @@ ObClient *focus_cycle(gboolean forward, gboolean linear, gboolean done, goto done_cycle; } else if (done) { if (focus_cycle_target) - client_activate(focus_cycle_target); + client_activate(focus_cycle_target, FALSE); goto done_cycle; } - if (!first) - grab_pointer(TRUE, None); if (!first) first = focus_client; if (!focus_cycle_target) focus_cycle_target = focus_client; @@ -311,6 +309,7 @@ ObClient *focus_cycle(gboolean forward, gboolean linear, gboolean done, desktop */ if (ft->transients == NULL && client_normal(ft) && ((ft->can_focus || ft->focus_notify) && + !ft->skip_taskbar && (ft->desktop == screen_desktop || ft->desktop == DESKTOP_ALL))) { if (ft != focus_cycle_target) { /* prevents flicker */ if (focus_cycle_target) @@ -331,7 +330,6 @@ done_cycle: order = NULL; popup_cycle(ft, FALSE); - grab_pointer(FALSE, None); return NULL; }