version 1.45, 2021/08/25 10:15:15 |
version 1.46, 2021/08/25 10:18:01 |
|
|
if (sy < w->layout_root->sy) |
if (sy < w->layout_root->sy) |
sy = w->layout_root->sy; |
sy = w->layout_root->sy; |
window_resize(w, sx, sy, xpixel, ypixel); |
window_resize(w, sx, sy, xpixel, ypixel); |
log_debug("%s: @%u resized to %u,%u; layout %u,%u", __func__, w->id, |
log_debug("%s: @%u resized to %ux%u; layout %ux%u", __func__, w->id, |
sx, sy, w->layout_root->sx, w->layout_root->sy); |
sx, sy, w->layout_root->sx, w->layout_root->sy); |
|
|
/* Restore the window zoom state. */ |
/* Restore the window zoom state. */ |
|
|
log_debug("%s: after %s (%ux%u), size is %ux%u", __func__, |
log_debug("%s: after %s (%ux%u), size is %ux%u", __func__, |
loop->name, cx, cy, *sx, *sy); |
loop->name, cx, cy, *sx, *sy); |
} |
} |
|
if (*sx != UINT_MAX && *sy != UINT_MAX) |
|
log_debug("%s: calculated size %ux%u", __func__, *sx, *sy); |
|
else |
|
log_debug("%s: no calculated size", __func__); |
|
|
/* Return whether a suitable size was found. */ |
/* Return whether a suitable size was found. */ |
if (type == WINDOW_SIZE_LARGEST) { |
if (type == WINDOW_SIZE_LARGEST) { |
|
|
* Latest clients can use the given client if suitable. If there is no |
* Latest clients can use the given client if suitable. If there is no |
* client and no window, use the default size as for manual type. |
* client and no window, use the default size as for manual type. |
*/ |
*/ |
if (type == WINDOW_SIZE_LATEST) { |
if (type == WINDOW_SIZE_LATEST && c != NULL && !ignore_client_size(c)) { |
if (c != NULL && !ignore_client_size(c)) { |
*sx = c->tty.sx; |
*sx = c->tty.sx; |
*sy = c->tty.sy - status_line_size(c); |
*sy = c->tty.sy - status_line_size(c); |
*xpixel = c->tty.xpixel; |
*xpixel = c->tty.xpixel; |
*ypixel = c->tty.ypixel; |
*ypixel = c->tty.ypixel; |
log_debug("%s: using %ux%u from %s", __func__, *sx, *sy, |
log_debug("%s: using %ux%u from %s", __func__, *sx, *sy, |
c->name); |
c->name); |
goto done; |
goto done; |
|
} |
|
} |
} |
|
|
/* |
/* |
|
|
*/ |
*/ |
if (w->active == NULL) |
if (w->active == NULL) |
return; |
return; |
log_debug("%s: @%u is %u,%u", __func__, w->id, w->sx, w->sy); |
log_debug("%s: @%u is %ux%u", __func__, w->id, w->sx, w->sy); |
|
|
/* |
/* |
* Type is manual, smallest, largest, latest. Current is the |
* Type is manual, smallest, largest, latest. Current is the |
|
|
* size. |
* size. |
*/ |
*/ |
if (!changed) { |
if (!changed) { |
|
log_debug("%s: @%u no size change", __func__, w->id); |
tty_update_window_offset(w); |
tty_update_window_offset(w); |
return; |
return; |
} |
} |
|
|
* the size immediately. Otherwise set the flag and it will be done |
* the size immediately. Otherwise set the flag and it will be done |
* later. |
* later. |
*/ |
*/ |
log_debug("%s: @%u new size %u,%u", __func__, w->id, sx, sy); |
log_debug("%s: @%u new size %ux%u", __func__, w->id, sx, sy); |
if (now || type == WINDOW_SIZE_MANUAL) |
if (now || type == WINDOW_SIZE_MANUAL) |
resize_window(w, sx, sy, xpixel, ypixel); |
resize_window(w, sx, sy, xpixel, ypixel); |
else { |
else { |