* natural_geometry width/height may still be zero in which case we set
* some fallback values. This is the case with foot and Qt applications.
*/
- if (wlr_box_empty(&view->current)) {
+ if (wlr_box_empty(&view->pending)) {
set_fallback_geometry(view);
} else {
- view->natural_geometry = view->current;
+ view->natural_geometry = view->pending;
}
}
{
assert(view);
int x, y;
- if (view_compute_centered_position(view, view->current.width,
- view->current.height, &x, &y)) {
+ if (view_compute_centered_position(view, view->pending.width,
+ view->pending.height, &x, &y)) {
view_move(view, x, y);
}
}
geo.width -= margin.left + margin.right;
geo.height -= margin.top + margin.bottom;
- if (view->current.width == geo.width
- && view->current.height == geo.height) {
+ if (view->pending.width == geo.width
+ && view->pending.height == geo.height) {
/* move horizontally/vertically without changing size */
view_move(view, geo.x, geo.y);
} else {
}
struct wlr_box dst = view_get_edge_snap_box(view, output, view->tiled);
- if (view->current.width == dst.width
- && view->current.height == dst.height) {
+ if (view->pending.width == dst.width
+ && view->pending.height == dst.height) {
/* move horizontally/vertically without changing size */
view_move(view, dst.x, dst.y);
} else {
} else if (!view_apply_special_geometry(view)) {
/* reposition view if it's offscreen */
if (!wlr_output_layout_intersects(layout, NULL,
- &view->current)) {
+ &view->pending)) {
view_center(view);
}
}
int x = 0, y = 0;
if (!strcasecmp(direction, "left")) {
x = usable.x + margin.left + rc.gap;
- y = view->current.y;
+ y = view->pending.y;
} else if (!strcasecmp(direction, "up")) {
- x = view->current.x;
+ x = view->pending.x;
y = usable.y + margin.top + rc.gap;
} else if (!strcasecmp(direction, "right")) {
- x = usable.x + usable.width - view->current.width
+ x = usable.x + usable.width - view->pending.width
- margin.right - rc.gap;
- y = view->current.y;
+ y = view->pending.y;
} else if (!strcasecmp(direction, "down")) {
- x = view->current.x;
- y = usable.y + usable.height - view->current.height
+ x = view->pending.x;
+ y = usable.y + usable.height - view->pending.height
- margin.bottom - rc.gap;
} else {
wlr_log(WLR_ERROR, "invalid edge");