summaryrefslogtreecommitdiffstats
path: root/include/sway/tree/view.h
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-05-24 22:30:44 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-01 23:14:58 +1000
commit1f2e399ade77070a2d0b82856ad9a3eef96b8676 (patch)
treec469197e140051aea912cb173723c7e55ce1e410 /include/sway/tree/view.h
parentSend frame done to floating views (diff)
downloadsway-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.h10
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
215void view_set_activated(struct sway_view *view, bool activated); 221void view_set_activated(struct sway_view *view, bool activated);
216 222
223void view_set_maximized(struct sway_view *view, bool maximized);
224
217void view_set_fullscreen_raw(struct sway_view *view, bool fullscreen); 225void view_set_fullscreen_raw(struct sway_view *view, bool fullscreen);
218 226
219void view_set_fullscreen(struct sway_view *view, bool fullscreen); 227void 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
237void view_unmap(struct sway_view *view); 245void view_unmap(struct sway_view *view);
238 246
239void view_update_position(struct sway_view *view, double ox, double oy); 247void view_update_position(struct sway_view *view, double lx, double ly);
240 248
241void view_update_size(struct sway_view *view, int width, int height); 249void view_update_size(struct sway_view *view, int width, int height);
242 250