aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/ipc-server.h1
-rw-r--r--include/sway/tree/container.h2
-rw-r--r--include/sway/tree/view.h9
-rw-r--r--include/sway/tree/workspace.h7
4 files changed, 19 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..6efda72f 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -45,6 +45,7 @@ enum sway_container_border {
struct sway_root;
struct sway_output;
+struct sway_workspace;
struct sway_view;
struct sway_container {
@@ -52,6 +53,7 @@ struct sway_container {
// TODO: Encapsulate state for other node types as well like C_CONTAINER
struct sway_root *sway_root;
struct sway_output *sway_output;
+ struct sway_workspace *sway_workspace;
struct sway_view *sway_view;
};
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index b51c54b5..648a74c4 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,7 @@ struct sway_view {
struct sway_container *swayc; // NULL for unmanaged views
struct wlr_surface *surface; // NULL for unmapped views
int width, height;
+ bool is_fullscreen;
union {
struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6;
@@ -63,6 +65,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 +82,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 +97,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 +111,8 @@ 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 set_state;
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);
diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h
index 8d49fefb..35e1df3b 100644
--- a/include/sway/tree/workspace.h
+++ b/include/sway/tree/workspace.h
@@ -3,6 +3,13 @@
#include "sway/tree/container.h"
+struct sway_view;
+
+struct sway_workspace {
+ struct sway_container *swayc;
+ struct sway_view *fullscreen;
+};
+
extern char *prev_workspace_name;
char *workspace_next_name(const char *output_name);