aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/sway/ipc-server.h1
-rw-r--r--include/sway/tree/container.h4
-rw-r--r--include/sway/tree/view.h9
3 files changed, 14 insertions, 0 deletions
diff --git a/include/sway/ipc-server.h b/include/sway/ipc-server.h
index c3389fe8..dd16a175 100644
--- a/include/sway/ipc-server.h
+++ b/include/sway/ipc-server.h
@@ -1,6 +1,7 @@
#ifndef _SWAY_IPC_SERVER_H
#define _SWAY_IPC_SERVER_H
#include <sys/socket.h>
+#include "sway/config.h"
#include "sway/tree/container.h"
#include "ipc.h"
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);