Lines Matching defs:w

26 resize_window(struct window *w, u_int sx, u_int sy, int xpixel, int ypixel)
41 zoomed = w->flags & WINDOW_ZOOMED;
43 window_unzoom(w, 1);
46 layout_resize(w, sx, sy);
49 if (sx < w->layout_root->sx)
50 sx = w->layout_root->sx;
51 if (sy < w->layout_root->sy)
52 sy = w->layout_root->sy;
53 window_resize(w, sx, sy, xpixel, ypixel);
54 log_debug("%s: @%u resized to %ux%u; layout %ux%u", __func__, w->id,
55 sx, sy, w->layout_root->sx, w->layout_root->sy);
59 window_zoom(w->active);
61 tty_update_window_offset(w);
62 server_redraw_window(w);
63 notify_window("window-layout-changed", w);
64 notify_window("window-resized", w);
65 w->flags &= ~WINDOW_RESIZE;
99 clients_with_window(struct window *w)
105 if (ignore_client_size(loop) || !session_has(loop->session, w))
115 struct session *s, struct window *w, int (*skip_client)(struct client *,
131 *sx = w->manual_sx;
132 *sy = w->manual_sy;
144 if (type == WINDOW_SIZE_LATEST && w != NULL)
145 n = clients_with_window(w);
157 if (loop != c && skip_client(loop, type, current, s, w)) {
167 if (type == WINDOW_SIZE_LATEST && n > 1 && loop != w->latest) {
176 if (w != NULL)
177 cw = server_client_get_client_window(loop, w->id);
222 if (w != NULL) {
226 if (loop != c && skip_client(loop, type, current, s, w))
232 cw = server_client_get_client_window(loop, w->id);
238 loop->name, w->id, cw->sx, cw->sy);
268 __unused int current, struct session *s, struct window *w)
270 if (w != NULL && !session_has(loop->session, w))
272 if (w == NULL && loop->session != s)
278 default_window_size(struct client *c, struct session *s, struct window *w,
312 if (!clients_calculate_size(type, 0, c, s, w,
338 int current, __unused struct session *s, struct window *w)
348 return (loop->session->curw->window != w);
349 return (session_has(loop->session, w) == 0);
353 recalculate_size(struct window *w, int now)
362 if (w->active == NULL)
364 log_debug("%s: @%u is %ux%u", __func__, w->id, w->sx, w->sy);
371 type = options_get_number(w->options, "window-size");
372 current = options_get_number(w->options, "aggressive-resize");
375 changed = clients_calculate_size(type, current, NULL, NULL, w,
382 if (w->flags & WINDOW_RESIZE) {
383 if (!now && changed && w->new_sx == sx && w->new_sy == sy)
386 if (!now && changed && w->sx == sx && w->sy == sy)
395 log_debug("%s: @%u no size change", __func__, w->id);
396 tty_update_window_offset(w);
405 log_debug("%s: @%u new size %ux%u", __func__, w->id, sx, sy);
407 resize_window(w, sx, sy, xpixel, ypixel);
409 w->new_sx = sx;
410 w->new_sy = sy;
411 w->new_xpixel = xpixel;
412 w->new_ypixel = ypixel;
414 w->flags |= WINDOW_RESIZE;
415 tty_update_window_offset(w);
430 struct window *w;
458 RB_FOREACH(w, windows, &windows)
459 recalculate_size(w, now);