X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus_cycle.c;h=93a9a9930ee1884743372b1ac2ff314f8500fb1e;hb=56a0993300e6b4939b2c4eae1cf4d444732cd043;hp=da9cd4cca65c6e9ff37b087bc100357eef1defc4;hpb=bd864012cd17f68c3a25ccfc2fc6cfd304c557f2;p=chaz%2Fopenbox diff --git a/openbox/focus_cycle.c b/openbox/focus_cycle.c index da9cd4cc..93a9a993 100644 --- a/openbox/focus_cycle.c +++ b/openbox/focus_cycle.c @@ -19,7 +19,6 @@ #include "focus_cycle.h" #include "focus_cycle_indicator.h" -#include "focus_cycle_popup.h" #include "client.h" #include "frame.h" #include "focus.h" @@ -38,8 +37,10 @@ typedef enum { ObClient *focus_cycle_target = NULL; static ObCycleType focus_cycle_type = OB_CYCLE_NONE; +static gboolean focus_cycle_linear; 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; @@ -73,7 +74,7 @@ void focus_cycle_addremove(ObClient *c, gboolean redraw) gboolean v, s; v = focus_cycle_valid(c); - s = focus_cycle_popup_is_showing(c); + s = focus_cycle_popup_is_showing(c) || c == focus_cycle_target; if (v != s) focus_cycle_reorder(); @@ -87,18 +88,21 @@ void focus_cycle_reorder() { if (focus_cycle_type == OB_CYCLE_NORMAL) { focus_cycle_target = focus_cycle_popup_refresh(focus_cycle_target, - TRUE); + TRUE, + focus_cycle_linear); focus_cycle_update_indicator(focus_cycle_target); if (!focus_cycle_target) - focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, - TRUE, TRUE, TRUE, TRUE, TRUE); + focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, + TRUE, TRUE, OB_FOCUS_CYCLE_POPUP_MODE_NONE, + 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, gboolean dialog, + gboolean showbar, ObFocusCyclePopupMode mode, gboolean done, gboolean cancel) { static GList *order = NULL; @@ -125,8 +129,10 @@ ObClient* focus_cycle(gboolean forward, gboolean all_desktops, } if (focus_cycle_target == NULL) { + focus_cycle_linear = linear; 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); @@ -153,13 +159,8 @@ ObClient* focus_cycle(gboolean forward, gboolean all_desktops, focus_cycle_type = OB_CYCLE_NORMAL; focus_cycle_draw_indicator(showbar ? ft : NULL); } - if (dialog) - /* 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); + /* same arguments as focus_target_valid */ + focus_cycle_popup_show(ft, mode, focus_cycle_linear); return focus_cycle_target; } else if (ft != focus_cycle_target) { focus_cycle_target = ft; @@ -301,8 +302,10 @@ ObClient* focus_directional_cycle(ObDirection dir, gboolean dock_windows, goto done_cycle; if (focus_cycle_target == NULL) { + focus_cycle_linear = FALSE; 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; } @@ -333,11 +336,7 @@ ObClient* focus_directional_cycle(ObDirection dir, gboolean dock_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: @@ -355,9 +354,10 @@ done_cycle: gboolean focus_cycle_valid(struct _ObClient *client) { - return focus_valid_target(client, TRUE, + 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);