diff options
author | Ryan Dwyer <[email protected]> | 2018-05-24 22:30:44 +1000 |
---|---|---|
committer | Ryan Dwyer <[email protected]> | 2018-06-01 23:14:58 +1000 |
commit | 1f2e399ade77070a2d0b82856ad9a3eef96b8676 (patch) | |
tree | c469197e140051aea912cb173723c7e55ce1e410 /include/sway/tree/view.h | |
parent | 1132efe42e8086216c7bab6b405d09a22231dde5 (diff) |
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 { void (*configure)(struct sway_view *view, double ox, double oy, int width, int height); void (*set_activated)(struct sway_view *view, bool activated); + void (*set_maximized)(struct sway_view *view, bool maximized); void (*set_fullscreen)(struct sway_view *view, bool fullscreen); + bool (*wants_floating)(struct sway_view *view); void (*for_each_surface)(struct sway_view *view, wlr_surface_iterator_func_t iterator, void *user_data); void (*close)(struct sway_view *view); @@ -50,6 +52,10 @@ struct sway_view { double x, y; int width, height; + // The size the view would want to be if it weren't tiled. + // Used when changing a view from tiled to floating. + int natural_width, natural_height; + bool is_fullscreen; char *title_format; @@ -214,6 +220,8 @@ void view_autoconfigure(struct sway_view *view); void view_set_activated(struct sway_view *view, bool activated); +void view_set_maximized(struct sway_view *view, bool maximized); + void view_set_fullscreen_raw(struct sway_view *view, bool fullscreen); 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); void view_unmap(struct sway_view *view); -void view_update_position(struct sway_view *view, double ox, double oy); +void view_update_position(struct sway_view *view, double lx, double ly); void view_update_size(struct sway_view *view, int width, int height); |