Lines Matching refs:wl

221 	struct winlink	*wl;
226 if ((wl = winlink_add(&s->windows, idx)) == NULL) {
244 winlink_remove(&s->windows, wl);
248 winlink_set_window(wl, w);
255 return (wl);
262 struct winlink *wl;
264 if ((wl = winlink_add(&s->windows, idx)) == NULL) {
268 winlink_set_window(wl, w);
271 return (wl);
276 session_detach(struct session *s, struct winlink *wl)
278 if (s->curw == wl &&
282 wl->flags &= ~WINLINK_ALERTFLAGS;
283 winlink_stack_remove(&s->lastw, wl);
284 winlink_remove(&s->windows, wl);
297 struct winlink *wl;
299 RB_FOREACH(wl, winlinks, &s->windows) {
300 if (wl->window == w)
301 return (wl);
307 session_next_alert(struct winlink *wl)
309 while (wl != NULL) {
310 if (wl->flags & WINLINK_ALERTFLAGS)
312 wl = winlink_next(wl);
314 return (wl);
321 struct winlink *wl;
326 wl = winlink_next(s->curw);
328 wl = session_next_alert(wl);
329 if (wl == NULL) {
330 wl = RB_MIN(winlinks, &s->windows);
331 if (alert && ((wl = session_next_alert(wl)) == NULL))
334 if (wl == s->curw)
336 winlink_stack_remove(&s->lastw, wl);
338 s->curw = wl;
339 wl->flags &= ~WINLINK_ALERTFLAGS;
344 session_previous_alert(struct winlink *wl)
346 while (wl != NULL) {
347 if (wl->flags & WINLINK_ALERTFLAGS)
349 wl = winlink_previous(wl);
351 return (wl);
358 struct winlink *wl;
363 wl = winlink_previous(s->curw);
365 wl = session_previous_alert(wl);
366 if (wl == NULL) {
367 wl = RB_MAX(winlinks, &s->windows);
368 if (alert && (wl = session_previous_alert(wl)) == NULL)
371 if (wl == s->curw)
373 winlink_stack_remove(&s->lastw, wl);
375 s->curw = wl;
376 wl->flags &= ~WINLINK_ALERTFLAGS;
384 struct winlink *wl;
386 wl = winlink_find_by_index(&s->windows, idx);
387 if (wl == NULL)
389 if (wl == s->curw)
391 winlink_stack_remove(&s->lastw, wl);
393 s->curw = wl;
394 wl->flags &= ~WINLINK_ALERTFLAGS;
402 struct winlink *wl;
404 wl = TAILQ_FIRST(&s->lastw);
405 if (wl == NULL)
407 if (wl == s->curw)
410 winlink_stack_remove(&s->lastw, wl);
412 s->curw = wl;
413 wl->flags &= ~WINLINK_ALERTFLAGS;
529 struct winlink *wl, *wl2;
547 RB_FOREACH(wl, winlinks, ww) {
548 wl2 = winlink_add(&s->windows, wl->idx);
549 winlink_set_window(wl2, wl->window);
550 wl2->flags |= wl->flags & WINLINK_ALERTFLAGS;
562 TAILQ_FOREACH(wl, &old_lastw, sentry) {
563 wl2 = winlink_find_by_index(&s->windows, wl->idx);
570 wl = RB_ROOT(&old_windows);
571 winlink_remove(&old_windows, wl);