]> git.mdlowis.com Git - proto/labwc.git/commitdiff
view: Add documentation for view->output
authorJohn Lindgren <john@jlindgren.net>
Tue, 21 Feb 2023 13:14:11 +0000 (08:14 -0500)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 5 Mar 2023 08:44:03 +0000 (08:44 +0000)
include/view.h

index b299ab26e29ff909177f67d54709fd0df4076007..2df867cf360dbf325b13b64226e7fd4428bbed24 100644 (file)
@@ -38,6 +38,22 @@ struct view {
        enum view_type type;
        const struct view_impl *impl;
        struct wl_list link;
+
+       /*
+        * The output that the view is displayed on. Specifically:
+        *
+        *  - For floating views, this is the output nearest to the
+        *    center of the view. It is computed automatically when the
+        *    view is moved or the output layout changes.
+        *
+        *  - For fullscreen/maximized/tiled views, this is the output
+        *    used to compute the view's geometry. The view remains on
+        *    the same output unless it is disabled or disconnected.
+        *
+        * Many view functions (e.g. view_center(), view_fullscreen(),
+        * view_maximize(), etc.) allow specifying a particular output
+        * by setting view->output explicitly before calling them.
+        */
        struct output *output;
        struct workspace *workspace;
        struct wlr_surface *surface;