if (size > 0) {
windows = g_new(Window, size);
win_it = windows;
- for (it = client_list; it != NULL; it = it->next, ++win_it)
+ for (it = client_list; it; it = g_list_next(it), ++win_it)
*win_it = ((ObClient*)it->data)->window;
} else
windows = NULL;
{
GSList *it;
- for (it = self->transients; it; it = it->next) {
+ for (it = self->transients; it; it = g_slist_next(it)) {
if (!func(it->data, data)) return;
client_foreach_transient(it->data, func, data);
}
} else {
GSList *it;
- for (it = self->group->members; it; it = it->next)
+ for (it = self->group->members; it; it = g_slist_next(it))
if (it->data != self &&
!((ObClient*)it->data)->transient_for) {
if (!func(it->data, data)) return;
if (self->group) {
GSList *it;
- for (it = self->group->members; it; it = it->next)
+ for (it = self->group->members; it; it = g_slist_next(it))
{
if (client_focused(it->data))
{
if (self->transient_for == OB_TRAN_GROUP) { /* transient of group */
GSList *it;
- for (it = self->group->members; it; it = it->next)
+ for (it = self->group->members; it; it = g_slist_next(it))
if (it->data != self)
((ObClient*)it->data)->transients =
g_slist_remove(((ObClient*)it->data)->transients, self);
}
/* tell our transients that we're gone */
- for (it = self->transients; it != NULL; it = it->next) {
+ for (it = self->transients; it; it = g_slist_next(it)) {
if (((ObClient*)it->data)->transient_for != OB_TRAN_GROUP) {
((ObClient*)it->data)->transient_for = NULL;
client_calc_layer(it->data);
} else {
GSList *it;
- for (it = self->group->members; it; it = it->next)
+ for (it = self->group->members; it; it = g_slist_next(it))
if (it->data != self &&
!((ObClient*)it->data)->transient_for) {
self->desktop = ((ObClient*)it->data)->desktop;
/* remove from the old group if there was one */
if (self->group != NULL) {
/* remove transients of the group */
- for (it = self->group->members; it; it = it->next)
+ for (it = self->group->members; it; it = g_slist_next(it))
self->transients = g_slist_remove(self->transients,
it->data);
/* remove myself from parents in the group */
if (self->transient_for == OB_TRAN_GROUP) {
- for (it = self->group->members; it; it = it->next) {
+ for (it = self->group->members; it;
+ it = g_slist_next(it))
+ {
ObClient *c = it->data;
if (c != self && !c->transient_for)
if (!self->transient_for) {
/* add other transients of the group that are already
set up */
- for (it = self->group->members; it; it = it->next) {
+ for (it = self->group->members; it;
+ it = g_slist_next(it))
+ {
ObClient *c = it->data;
if (c != self && c->transient_for == OB_TRAN_GROUP)
self->transients =
/* look for duplicates and append a number */
nums = 0;
- for (it = client_list; it; it = it->next)
+ for (it = client_list; it; it = g_list_next(it))
if (it->data != self) {
ObClient *c = it->data;
if (0 == strncmp(c->title, data, strlen(data)))
GSList *it;
ObClient *ret;
- for (it = self->transients; it != NULL; it = it->next) {
+ for (it = self->transients; it; it = g_slist_next(it)) {
if (client_focused(it->data)) return it->data;
if ((ret = client_search_focus_tree(it->data))) return ret;
}
GSList *it;
gboolean recursed = FALSE;
- for (it = self->group->members; it; it = it->next)
+ for (it = self->group->members; it; it = g_slist_next(it))
if (!((ObClient*)it->data)->transient_for) {
ObClient *c;
if ((c = client_search_focus_tree_full(it->data)))
own = calc_layer(self);
self->layer = l > own ? l : own;
- for (it = self->transients; it; it = it->next)
+ for (it = self->transients; it; it = g_slist_next(it))
client_calc_layer_recursive(it->data, orig,
l, raised ? raised : l != old);
}
/* iconify all transients */
- for (it = self->transients; it != NULL; it = it->next)
+ for (it = self->transients; it; it = g_slist_next(it))
if (it->data != self) client_iconify_recursive(it->data,
iconic, curdesk);
}
}
/* move all transients */
- for (it = self->transients; it != NULL; it = it->next)
+ for (it = self->transients; it; it = g_slist_next(it))
if (it->data != self) client_set_desktop_recursive(it->data,
target, donthide);
}
GSList *it;
ObClient *ret;
- for (it = self->transients; it != NULL; it = it->next) {
+ for (it = self->transients; it; it = g_slist_next(it)) {
ObClient *c = it->data;
if ((ret = client_search_modal_child(c))) return ret;
if (c->modal) return c;
best_score = -1;
best_client = NULL;
- for(it = g_list_first(client_list); it; it = it->next) {
+ for(it = g_list_first(client_list); it; it = g_list_next(it)) {
cur = it->data;
/* the currently selected window isn't interesting */
g_assert(self->group);
- for (it = self->group->members; it; it = it->next) {
+ for (it = self->group->members; it; it = g_slist_next(it)) {
ObClient *c = it->data;
/* checking transient_for prevents infinate loops! */
} else {
GSList *it;
- for (it = self->group->members; it; it = it->next) {
+ for (it = self->group->members; it; it = g_slist_next(it)) {
ObClient *c = it->data;
/* checking transient_for prevents infinate loops! */
} else {
GSList *it;
- for (it = self->group->members; it; it = it->next) {
+ for (it = self->group->members; it; it = g_slist_next(it)) {
ObClient *c = it->data;
/* checking transient_for prevents infinate loops! */
/* default: top of screen */
dest = a->y;
- for(it = g_list_first(client_list); it; it = it->next) {
+ for(it = client_list; it; it = g_list_next(it)) {
gint his_edge_start, his_edge_end, his_offset;
ObClient *cur = it->data;
/* default: bottom of screen */
dest = a->y + a->height;
- for(it = g_list_first(client_list); it; it = it->next) {
+ for(it = client_list; it; it = g_list_next(it)) {
gint his_edge_start, his_edge_end, his_offset;
ObClient *cur = it->data;
/* default: leftmost egde of screen */
dest = a->x;
- for(it = g_list_first(client_list); it; it = it->next) {
+ for(it = client_list; it; it = g_list_next(it)) {
gint his_edge_start, his_edge_end, his_offset;
ObClient *cur = it->data;
/* default: rightmost edge of screen */
dest = a->x + a->width;
- for(it = g_list_first(client_list); it; it = it->next) {
+ for(it = client_list; it; it = g_list_next(it)) {
gint his_edge_start, his_edge_end, his_offset;
ObClient *cur = it->data;
ObClient *ret = NULL;
if (screen_pointer_pos(&x, &y)) {
- for (it = stacking_list; it != NULL; it = it->next) {
+ for (it = stacking_list; it; it = g_list_next(it)) {
if (WINDOW_IS_CLIENT(it->data)) {
ObClient *c = WINDOW_AS_CLIENT(it->data);
if (c->frame->visible &&