diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-04-30 21:24:13 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-04-30 21:24:13 +1000 |
commit | e67f3543332349e63b5099a241fdd85ce28ea54b (patch) | |
tree | 54bede11d48f561693d1288e0980660c644b4dc3 /include/sway/tree | |
parent | b84dfa794c4bc24d3338995cf89fb4864ab63e99 (diff) |
Implement borders
Implements rendering of borders. Title text is still to do.
Implements the following configuration directives:
* client.focused
* client.focused_inactive
* client.unfocused
* client.urgent
* border
* default_border
Diffstat (limited to 'include/sway/tree')
-rw-r--r-- | include/sway/tree/container.h | 2 | ||||
-rw-r--r-- | include/sway/tree/view.h | 11 |
2 files changed, 10 insertions, 3 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..352a62bc 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,8 @@ const char *view_get_instance(struct sway_view *view); void view_configure(struct sway_view *view, double ox, double oy, int width, int height); +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); @@ -184,8 +193,6 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface); void view_unmap(struct sway_view *view); -void view_update_position(struct sway_view *view, double ox, double oy); - void view_update_size(struct sway_view *view, int width, int height); void view_child_init(struct sway_view_child *child, |