61
clientCompareApp (gconstpointer a, gconstpointer b)
60
clientCompareModal (gconstpointer a, gconstpointer b)
63
return !clientSameApplication ((Client *) a, (Client *) b);
62
return !clientIsModalFor ((Client *) a, (Client *) b);
68
66
clientGetCycleRange (ScreenInfo *screen_info)
107
105
for (c2 = c, i = 0; c && i < screen_info->client_count; i++, c2 = c2->next)
109
if (!clientSelectMask (c2, NULL, range,
110
screen_info->params->cycle_apps_only ? WINDOW_NORMAL : WINDOW_REGULAR_FOCUSABLE))
107
search_range = range;
109
* We want to include modals even if skip pager/taskbar because
110
* modals are supposed to be focused
112
if (clientIsModal(c2))
114
search_range |= (SEARCH_INCLUDE_SKIP_TASKBAR | SEARCH_INCLUDE_SKIP_PAGER);
116
if (!clientSelectMask (c2, NULL, search_range, WINDOW_REGULAR_FOCUSABLE))
118
TRACE ("%s not in select mask", c2->name);
113
121
if (screen_info->params->cycle_apps_only)
116
124
* For apps only cycling, it's a tad more complicated
117
* - We want only regular windows (no dialog or anything else)
118
* - We don't want a window from the same application to be
125
* - We want "fake" dialogs, ie without a parent window
126
* - We do not want dialogs but we want modals
127
* - If a modal was added,we do not want to add
121
if (c2->type != WINDOW_NORMAL)
123
if (g_list_find_custom (client_list, c2, clientCompareApp))
131
if (c2->type & WINDOW_TYPE_DIALOG)
133
if (clientIsValidTransientOrModal (c2))
135
if (!clientIsModal(c2))
137
TRACE ("%s is not modal", c2->name);
142
else if (!(c2->type & WINDOW_NORMAL))
145
TRACE ("%s is not normal", c2->name);
151
if (g_list_find_custom (client_list, c2, clientCompareModal))
153
TRACE ("%s found as modal list", c2->name);
127
159
TRACE ("clientCycleCreateList: adding %s", c2->name);
128
160
client_list = g_list_append (client_list, c2);