aboutsummaryrefslogtreecommitdiff
path: root/include/sway/tree
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-04-16 20:36:40 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-04-16 20:36:40 +1000
commit52420cc24d61db8d22cf0d391f1f84b37bf087d5 (patch)
treef975a3708c0d1562a8d2fcdceaed9a76aadbf1f4 /include/sway/tree
parentdbc36935ee857375669e7ab3d0f20f1b5b098d23 (diff)
Implement fullscreen.
Diffstat (limited to 'include/sway/tree')
-rw-r--r--include/sway/tree/container.h4
-rw-r--r--include/sway/tree/view.h9
2 files changed, 13 insertions, 0 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index 2a8b8aba..22bd7240 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -72,9 +72,13 @@ struct sway_container {
// For C_OUTPUT, this is the output position in layout coordinates
// For other types, this is the position in output-local coordinates
double x, y;
+ double saved_x, saved_y;
// does not include borders or gaps.
double width, height;
+ // For C_WORKSPACE only
+ struct sway_view *fullscreen;
+
list_t *children;
struct sway_container *parent;
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index b51c54b5..73d5f6c7 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -28,6 +28,7 @@ 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_fullscreen)(struct sway_view *view, bool fullscreen);
void (*for_each_surface)(struct sway_view *view,
wlr_surface_iterator_func_t iterator, void *user_data);
void (*close)(struct sway_view *view);
@@ -41,6 +42,8 @@ struct sway_view {
struct sway_container *swayc; // NULL for unmanaged views
struct wlr_surface *surface; // NULL for unmapped views
int width, height;
+ int saved_width, saved_height;
+ bool is_fullscreen;
union {
struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6;
@@ -63,6 +66,7 @@ struct sway_xdg_shell_v6_view {
struct wl_listener request_move;
struct wl_listener request_resize;
struct wl_listener request_maximize;
+ struct wl_listener request_fullscreen;
struct wl_listener new_popup;
struct wl_listener map;
struct wl_listener unmap;
@@ -79,6 +83,7 @@ struct sway_xwayland_view {
struct wl_listener request_resize;
struct wl_listener request_maximize;
struct wl_listener request_configure;
+ struct wl_listener request_fullscreen;
struct wl_listener map;
struct wl_listener unmap;
struct wl_listener destroy;
@@ -93,6 +98,7 @@ struct sway_xwayland_unmanaged {
int lx, ly;
struct wl_listener request_configure;
+ struct wl_listener request_fullscreen;
struct wl_listener commit;
struct wl_listener map;
struct wl_listener unmap;
@@ -106,6 +112,7 @@ struct sway_wl_shell_view {
struct wl_listener request_move;
struct wl_listener request_resize;
struct wl_listener request_maximize;
+ struct wl_listener request_fullscreen;
struct wl_listener destroy;
int pending_width, pending_height;
@@ -155,6 +162,8 @@ void view_configure(struct sway_view *view, double ox, double oy, int width,
void view_set_activated(struct sway_view *view, bool activated);
+void view_set_fullscreen(struct sway_view *view, bool fullscreen);
+
void view_close(struct sway_view *view);
void view_damage(struct sway_view *view, bool whole);