diff --git a/include/view.h b/include/view.h index d7c0d498..aaff7fbe 100644 --- a/include/view.h +++ b/include/view.h @@ -147,6 +147,13 @@ void view_move(struct view *view, int x, int y); void view_moved(struct view *view); void view_minimize(struct view *view, bool minimized); void view_store_natural_geometry(struct view *view); + +/** + * view_center - center view within some region + * @view: view to be centered + * @ref: optional reference region (in layout coordinates) to center + * within; if NULL, view is centered within usable area of its output + */ void view_center(struct view *view, const struct wlr_box *ref); void view_restore_to(struct view *view, struct wlr_box geometry); void view_set_untiled(struct view *view); diff --git a/src/view.c b/src/view.c index 1ea34012..a7a6a8a0 100644 --- a/src/view.c +++ b/src/view.c @@ -102,11 +102,6 @@ view_get_edge_snap_box(struct view *view, struct output *output, return dst; } -/* - * At present, a view can only 'enter' one output at a time, although the view - * may span multiple outputs. Ideally we would handle multiple outputs, but - * this method is the simplest form of what we want. - */ static void view_discover_output(struct view *view) {