finch/libgnt/gntwm.c

changeset 34306
4fb8809f2f97
parent 33892
ef97228bc5f0
child 35379
ea1a0327001e
child 35456
821aa4bcb6fa
equal deleted inserted replaced
34305:5804117fb298 34306:4fb8809f2f97
425 ensure_normal_mode(wm); 425 ensure_normal_mode(wm);
426 } 426 }
427 427
428 w = wm->cws->ordered->data; 428 w = wm->cws->ordered->data;
429 orgpos = pos = g_list_index(wm->cws->list, w); 429 orgpos = pos = g_list_index(wm->cws->list, w);
430 g_return_if_fail(pos < 0);
430 431
431 do { 432 do {
432 pos += direction; 433 pos += direction;
433 434
434 if (pos < 0) { 435 if (pos < 0) {
435 wid = g_list_last(wm->cws->list)->data; 436 wid = g_list_last(wm->cws->list)->data;
436 pos = g_list_length(wm->cws->list) - 1; 437 pos = g_list_length(wm->cws->list) - 1;
437 } else if (pos >= g_list_length(wm->cws->list)) { 438 } else if ((guint)pos >= g_list_length(wm->cws->list)) {
438 wid = wm->cws->list->data; 439 wid = wm->cws->list->data;
439 pos = 0; 440 pos = 0;
440 } else 441 } else
441 wid = g_list_nth_data(wm->cws->list, pos); 442 wid = g_list_nth_data(wm->cws->list, pos);
442 } while (urgent && !GNT_WIDGET_IS_FLAG_SET(wid, GNT_WIDGET_URGENT) && pos != orgpos); 443 } while (urgent && !GNT_WIDGET_IS_FLAG_SET(wid, GNT_WIDGET_URGENT) && pos != orgpos);

mercurial