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/view.h | |
parent | Merge pull request #1873 from RyanDwyer/remove-arrange-windows (diff) | |
download | sway-e67f3543332349e63b5099a241fdd85ce28ea54b.tar.gz sway-e67f3543332349e63b5099a241fdd85ce28ea54b.tar.zst sway-e67f3543332349e63b5099a241fdd85ce28ea54b.zip |
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/view.h')
-rw-r--r-- | include/sway/tree/view.h | 11 |
1 files changed, 9 insertions, 2 deletions
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 { | |||
41 | 41 | ||
42 | struct sway_container *swayc; // NULL for unmapped views | 42 | struct sway_container *swayc; // NULL for unmapped views |
43 | struct wlr_surface *surface; // NULL for unmapped views | 43 | struct wlr_surface *surface; // NULL for unmapped views |
44 | |||
45 | // Geometry of the view itself (excludes borders) | ||
46 | double x, y; | ||
44 | int width, height; | 47 | int width, height; |
48 | |||
45 | bool is_fullscreen; | 49 | bool is_fullscreen; |
46 | 50 | ||
51 | enum sway_container_border border; | ||
52 | int border_thickness; | ||
53 | |||
47 | union { | 54 | union { |
48 | struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; | 55 | struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; |
49 | struct wlr_xwayland_surface *wlr_xwayland_surface; | 56 | struct wlr_xwayland_surface *wlr_xwayland_surface; |
@@ -160,6 +167,8 @@ const char *view_get_instance(struct sway_view *view); | |||
160 | void view_configure(struct sway_view *view, double ox, double oy, int width, | 167 | void view_configure(struct sway_view *view, double ox, double oy, int width, |
161 | int height); | 168 | int height); |
162 | 169 | ||
170 | void view_autoconfigure(struct sway_view *view); | ||
171 | |||
163 | void view_set_activated(struct sway_view *view, bool activated); | 172 | void view_set_activated(struct sway_view *view, bool activated); |
164 | 173 | ||
165 | void view_set_fullscreen_raw(struct sway_view *view, bool fullscreen); | 174 | 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); | |||
184 | 193 | ||
185 | void view_unmap(struct sway_view *view); | 194 | void view_unmap(struct sway_view *view); |
186 | 195 | ||
187 | void view_update_position(struct sway_view *view, double ox, double oy); | ||
188 | |||
189 | void view_update_size(struct sway_view *view, int width, int height); | 196 | void view_update_size(struct sway_view *view, int width, int height); |
190 | 197 | ||
191 | void view_child_init(struct sway_view_child *child, | 198 | void view_child_init(struct sway_view_child *child, |