aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-07-13 21:53:56 +0100
committeremersion <contact@emersion.fr>2018-08-06 15:20:30 +0100
commit700941dde8d270b7986bd592fcb42333e7626718 (patch)
treea7596009b90165dbd34b01598a704a2801a7e73c /include/sway
parent0cd418ba42bf7fa9570a2c1c09cea153d3337c7a (diff)
downloadsway-700941dde8d270b7986bd592fcb42333e7626718.tar.xz
Listen to server-decoration mode changes
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/decoration.h13
-rw-r--r--include/sway/server.h10
2 files changed, 22 insertions, 1 deletions
diff --git a/include/sway/decoration.h b/include/sway/decoration.h
new file mode 100644
index 00000000..c77c04c7
--- /dev/null
+++ b/include/sway/decoration.h
@@ -0,0 +1,13 @@
+#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_listener destroy;
+ struct wl_listener mode;
+};
+
+#endif
diff --git a/include/sway/server.h b/include/sway/server.h
index a3782f91..7e73fb4f 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,16 @@ 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;
+
bool debug_txn_timings;
list_t *transactions;
@@ -71,4 +77,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