diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-24 22:30:44 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-01 23:14:58 +1000 |
commit | 1f2e399ade77070a2d0b82856ad9a3eef96b8676 (patch) | |
tree | c469197e140051aea912cb173723c7e55ce1e410 /include/sway/tree/view.h | |
parent | Send frame done to floating views (diff) | |
download | sway-1f2e399ade77070a2d0b82856ad9a3eef96b8676.tar.gz sway-1f2e399ade77070a2d0b82856ad9a3eef96b8676.tar.zst sway-1f2e399ade77070a2d0b82856ad9a3eef96b8676.zip |
Implement floating
Diffstat (limited to 'include/sway/tree/view.h')
-rw-r--r-- | include/sway/tree/view.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index a8bf4955..6990e5b6 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -32,7 +32,9 @@ struct sway_view_impl { | |||
32 | void (*configure)(struct sway_view *view, double ox, double oy, int width, | 32 | void (*configure)(struct sway_view *view, double ox, double oy, int width, |
33 | int height); | 33 | int height); |
34 | void (*set_activated)(struct sway_view *view, bool activated); | 34 | void (*set_activated)(struct sway_view *view, bool activated); |
35 | void (*set_maximized)(struct sway_view *view, bool maximized); | ||
35 | void (*set_fullscreen)(struct sway_view *view, bool fullscreen); | 36 | void (*set_fullscreen)(struct sway_view *view, bool fullscreen); |
37 | bool (*wants_floating)(struct sway_view *view); | ||
36 | void (*for_each_surface)(struct sway_view *view, | 38 | void (*for_each_surface)(struct sway_view *view, |
37 | wlr_surface_iterator_func_t iterator, void *user_data); | 39 | wlr_surface_iterator_func_t iterator, void *user_data); |
38 | void (*close)(struct sway_view *view); | 40 | void (*close)(struct sway_view *view); |
@@ -50,6 +52,10 @@ struct sway_view { | |||
50 | double x, y; | 52 | double x, y; |
51 | int width, height; | 53 | int width, height; |
52 | 54 | ||
55 | // The size the view would want to be if it weren't tiled. | ||
56 | // Used when changing a view from tiled to floating. | ||
57 | int natural_width, natural_height; | ||
58 | |||
53 | bool is_fullscreen; | 59 | bool is_fullscreen; |
54 | 60 | ||
55 | char *title_format; | 61 | char *title_format; |
@@ -214,6 +220,8 @@ void view_autoconfigure(struct sway_view *view); | |||
214 | 220 | ||
215 | void view_set_activated(struct sway_view *view, bool activated); | 221 | void view_set_activated(struct sway_view *view, bool activated); |
216 | 222 | ||
223 | void view_set_maximized(struct sway_view *view, bool maximized); | ||
224 | |||
217 | void view_set_fullscreen_raw(struct sway_view *view, bool fullscreen); | 225 | void view_set_fullscreen_raw(struct sway_view *view, bool fullscreen); |
218 | 226 | ||
219 | void view_set_fullscreen(struct sway_view *view, bool fullscreen); | 227 | void view_set_fullscreen(struct sway_view *view, bool fullscreen); |
@@ -236,7 +244,7 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface); | |||
236 | 244 | ||
237 | void view_unmap(struct sway_view *view); | 245 | void view_unmap(struct sway_view *view); |
238 | 246 | ||
239 | void view_update_position(struct sway_view *view, double ox, double oy); | 247 | void view_update_position(struct sway_view *view, double lx, double ly); |
240 | 248 | ||
241 | void view_update_size(struct sway_view *view, int width, int height); | 249 | void view_update_size(struct sway_view *view, int width, int height); |
242 | 250 | ||