aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/decoration.h17
-rw-r--r--include/sway/server.h11
-rw-r--r--include/sway/tree/container.h2
-rw-r--r--include/sway/tree/view.h9
-rw-r--r--include/sway/tree/workspace.h4
5 files changed, 40 insertions, 3 deletions
diff --git a/include/sway/decoration.h b/include/sway/decoration.h
new file mode 100644
index 00000000..7916746e
--- /dev/null
+++ b/include/sway/decoration.h
@@ -0,0 +1,17 @@
+#ifndef _SWAY_DECORATION_H
+#define _SWAY_DECORATION_H
+
+#include <wlr/types/wlr_server_decoration.h>
+
+struct sway_server_decoration {
+ struct wlr_server_decoration *wlr_server_decoration;
+ struct wl_list link;
+
+ struct wl_listener destroy;
+ struct wl_listener mode;
+};
+
+struct sway_server_decoration *decoration_from_surface(
+ struct wlr_surface *surface);
+
+#endif
diff --git a/include/sway/server.h b/include/sway/server.h
index a3782f91..b93584b6 100644
--- a/include/sway/server.h
+++ b/include/sway/server.h
@@ -4,12 +4,13 @@
#include <wayland-server.h>
#include <wlr/backend.h>
#include <wlr/backend/session.h>
+#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_layer_shell.h>
+#include <wlr/types/wlr_server_decoration.h>
#include <wlr/types/wlr_xdg_shell_v6.h>
#include <wlr/types/wlr_xdg_shell.h>
-#include <wlr/render/wlr_renderer.h>
// TODO WLR: make Xwayland optional
#include "list.h"
#include "config.h"
@@ -42,11 +43,17 @@ struct sway_server {
struct wlr_xdg_shell *xdg_shell;
struct wl_listener xdg_shell_surface;
+
#ifdef HAVE_XWAYLAND
struct sway_xwayland xwayland;
struct wl_listener xwayland_surface;
struct wl_listener xwayland_ready;
#endif
+
+ struct wlr_server_decoration_manager *server_decoration_manager;
+ struct wl_listener server_decoration;
+ struct wl_list decorations; // sway_server_decoration::link
+
bool debug_txn_timings;
list_t *transactions;
@@ -71,4 +78,6 @@ void handle_xdg_shell_surface(struct wl_listener *listener, void *data);
#ifdef HAVE_XWAYLAND
void handle_xwayland_surface(struct wl_listener *listener, void *data);
#endif
+void handle_server_decoration(struct wl_listener *listener, void *data);
+
#endif
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index 44ff9f7d..16a180f8 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -113,7 +113,7 @@ struct sway_container {
enum sway_container_type type;
enum sway_container_layout layout;
- enum sway_container_layout prev_layout;
+ enum sway_container_layout prev_split_layout;
bool is_sticky;
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 37fd02bc..c2225bcb 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -118,6 +118,8 @@ struct sway_view {
struct sway_xdg_shell_v6_view {
struct sway_view view;
+ enum wlr_server_decoration_manager_mode deco_mode;
+
struct wl_listener commit;
struct wl_listener request_move;
struct wl_listener request_resize;
@@ -134,6 +136,8 @@ struct sway_xdg_shell_v6_view {
struct sway_xdg_shell_view {
struct sway_view view;
+ enum wlr_server_decoration_manager_mode deco_mode;
+
struct wl_listener commit;
struct wl_listener request_move;
struct wl_listener request_resize;
@@ -316,6 +320,11 @@ void view_update_title(struct sway_view *view, bool force);
void view_execute_criteria(struct sway_view *view);
/**
+ * Find any view that has the given mark and return it.
+ */
+struct sway_view *view_find_mark(char *mark);
+
+/**
* Find any view that has the given mark and remove the mark from the view.
* Returns true if it matched a view.
*/
diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h
index 3337f2c8..239cbbdb 100644
--- a/include/sway/tree/workspace.h
+++ b/include/sway/tree/workspace.h
@@ -1,6 +1,7 @@
#ifndef _SWAY_WORKSPACE_H
#define _SWAY_WORKSPACE_H
+#include <stdbool.h>
#include "sway/tree/container.h"
struct sway_view;
@@ -17,7 +18,8 @@ extern char *prev_workspace_name;
char *workspace_next_name(const char *output_name);
-bool workspace_switch(struct sway_container *workspace);
+bool workspace_switch(struct sway_container *workspace,
+ bool no_auto_back_and_forth);
struct sway_container *workspace_by_number(const char* name);