void view_store_natural_geometry(struct view *view);
void view_center(struct view *view);
void view_restore_to(struct view *view, struct wlr_box geometry);
+void view_set_untiled(struct view *view);
void view_maximize(struct view *view, bool maximize,
bool store_natural_geometry);
void view_set_fullscreen(struct view *view, bool fullscreen,
* Reset tiled state but keep the same geometry as the
* starting point for the resize.
*/
- view->tiled = 0;
+ view_set_untiled(view);
cursor_set(seat, cursor_get_from_edge(edges));
break;
default:
if (mode == LAB_INPUT_STATE_MOVE) {
if (!snap_to_edge(view)) {
/* Reset tiled state if not snapped */
- view->tiled = 0;
+ view_set_untiled(view);
}
}
/* Update focus/cursor image */
/*
* Un-maximize view and move it to specific geometry. Does not reset
- * tiled state (set view->tiled = 0 manually if you want that).
+ * tiled state (use view_set_untiled() if you want that).
*/
void
view_restore_to(struct view *view, struct wlr_box geometry)
view_move_resize(view, geometry);
}
+/* Reset tiled state of view without changing geometry */
+void
+view_set_untiled(struct view *view)
+{
+ assert(view);
+ view->tiled = VIEW_EDGE_INVALID;
+}
+
void
view_maximize(struct view *view, bool maximize, bool store_natural_geometry)
{