diff options
author | emersion <contact@emersion.fr> | 2018-05-01 15:31:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-01 15:31:02 +0100 |
commit | 0e51c7be449dd68025d5acd8c634f8dcacb10a16 (patch) | |
tree | c2c7e713a150c7f9a947b100e0fa4c56efb5c3b2 /include/sway/tree | |
parent | bf0603cd2d905554cc57d121b56b6708bb1d382b (diff) | |
parent | cb07434913b89580a4025824cb181733b2db1eb7 (diff) |
Merge pull request #1874 from RyanDwyer/borders
Implement borders
Diffstat (limited to 'include/sway/tree')
-rw-r--r-- | include/sway/tree/container.h | 2 | ||||
-rw-r--r-- | include/sway/tree/view.h | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index 9c921fc4..d092af49 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h @@ -72,8 +72,8 @@ struct sway_container { // For C_ROOT, this has no meaning // For C_OUTPUT, this is the output position in layout coordinates // For other types, this is the position in output-local coordinates + // Includes borders double x, y; - // does not include borders or gaps. double width, height; double saved_width, saved_height; diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index a4ad9971..21127ab1 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h @@ -41,9 +41,16 @@ struct sway_view { struct sway_container *swayc; // NULL for unmapped views struct wlr_surface *surface; // NULL for unmapped views + + // Geometry of the view itself (excludes borders) + double x, y; int width, height; + bool is_fullscreen; + enum sway_container_border border; + int border_thickness; + union { struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; struct wlr_xwayland_surface *wlr_xwayland_surface; @@ -160,6 +167,12 @@ const char *view_get_instance(struct sway_view *view); void view_configure(struct sway_view *view, double ox, double oy, int width, int height); +/** + * Configure the view's position and size based on the swayc's position and + * size, taking borders into consideration. + */ +void view_autoconfigure(struct sway_view *view); + void view_set_activated(struct sway_view *view, bool activated); void view_set_fullscreen_raw(struct sway_view *view, bool fullscreen); |