aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/server.h9
-rw-r--r--include/sway/xwayland.h25
2 files changed, 28 insertions, 6 deletions
diff --git a/include/sway/server.h b/include/sway/server.h
index 963d4dc1..b016aba8 100644
--- a/include/sway/server.h
+++ b/include/sway/server.h
@@ -11,7 +11,7 @@
#include <wlr/types/wlr_xdg_shell.h>
#include <wlr/render/wlr_renderer.h>
// TODO WLR: make Xwayland optional
-#include <wlr/xwayland.h>
+#include "sway/xwayland.h"
struct sway_server {
struct wl_display *wl_display;
@@ -37,12 +37,9 @@ struct sway_server {
struct wlr_xdg_shell *xdg_shell;
struct wl_listener xdg_shell_surface;
- struct wlr_xwayland *xwayland;
- struct wlr_xcursor_manager *xcursor_manager;
+ struct sway_xwayland xwayland;
struct wl_listener xwayland_surface;
-
- struct wlr_wl_shell *wl_shell;
- struct wl_listener wl_shell_surface;
+ struct wl_listener xwayland_ready;
};
struct sway_server server;
diff --git a/include/sway/xwayland.h b/include/sway/xwayland.h
new file mode 100644
index 00000000..78d1053b
--- /dev/null
+++ b/include/sway/xwayland.h
@@ -0,0 +1,25 @@
+#ifndef SWAY_XWAYLAND_H
+#define SWAY_XWAYLAND_H
+
+#include <wlr/xwayland.h>
+#include <xcb/xproto.h>
+
+enum atom_name {
+ NET_WM_WINDOW_TYPE_DIALOG,
+ NET_WM_WINDOW_TYPE_UTILITY,
+ NET_WM_WINDOW_TYPE_TOOLBAR,
+ NET_WM_WINDOW_TYPE_SPLASH,
+ NET_WM_STATE_MODAL,
+ ATOM_LAST,
+};
+
+struct sway_xwayland {
+ struct wlr_xwayland *wlr_xwayland;
+ struct wlr_xcursor_manager *xcursor_manager;
+
+ xcb_atom_t atoms[ATOM_LAST];
+};
+
+void handle_xwayland_ready(struct wl_listener *listener, void *data);
+
+#endif