aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/rootston/config.h1
-rw-r--r--include/rootston/desktop.h7
-rw-r--r--include/rootston/server.h2
-rw-r--r--include/rootston/view.h4
-rw-r--r--include/wlr/types/wlr_keyboard.h1
-rw-r--r--include/wlr/types/wlr_surface.h7
-rw-r--r--include/wlr/types/wlr_xdg_shell_v6.h8
7 files changed, 28 insertions, 2 deletions
diff --git a/include/rootston/config.h b/include/rootston/config.h
index 545b6742..66347c3c 100644
--- a/include/rootston/config.h
+++ b/include/rootston/config.h
@@ -27,6 +27,7 @@ struct binding_config {
};
struct roots_config {
+ bool xwayland;
// TODO: Multiple cursors, multiseat
struct {
char *mapped_output;
diff --git a/include/rootston/desktop.h b/include/rootston/desktop.h
index 68fc5b94..1225bdcd 100644
--- a/include/rootston/desktop.h
+++ b/include/rootston/desktop.h
@@ -35,15 +35,18 @@ struct roots_desktop {
struct wlr_compositor *compositor;
struct wlr_wl_shell *wl_shell;
struct wlr_xdg_shell_v6 *xdg_shell_v6;
- struct wlr_xwayland *xwayland;
struct wlr_gamma_control_manager *gamma_control_manager;
struct wlr_screenshooter *screenshooter;
struct wl_listener output_add;
struct wl_listener output_remove;
struct wl_listener xdg_shell_v6_surface;
- struct wl_listener xwayland_surface;
struct wl_listener wl_shell_surface;
+
+#ifdef HAS_XWAYLAND
+ struct wlr_xwayland *xwayland;
+ struct wl_listener xwayland_surface;
+#endif
};
struct roots_server;
diff --git a/include/rootston/server.h b/include/rootston/server.h
index 15e3a4ee..a4eacb7f 100644
--- a/include/rootston/server.h
+++ b/include/rootston/server.h
@@ -5,7 +5,9 @@
#include <wlr/backend/session.h>
#include <wlr/types/wlr_data_device_manager.h>
#include <wlr/render.h>
+#ifdef HAS_XWAYLAND
#include <wlr/xwayland.h>
+#endif
#include "rootston/config.h"
#include "rootston/desktop.h"
#include "rootston/input.h"
diff --git a/include/rootston/view.h b/include/rootston/view.h
index 0b68f93f..af087182 100644
--- a/include/rootston/view.h
+++ b/include/rootston/view.h
@@ -58,12 +58,16 @@ struct roots_view {
union {
struct wlr_wl_shell_surface *wl_shell_surface;
struct wlr_xdg_surface_v6 *xdg_surface_v6;
+#ifdef HAS_XWAYLAND
struct wlr_xwayland_surface *xwayland_surface;
+#endif
};
union {
struct roots_wl_shell_surface *roots_wl_shell_surface;
struct roots_xdg_surface_v6 *roots_xdg_surface_v6;
+#ifdef HAS_XWAYLAND
struct roots_xwayland_surface *roots_xwayland_surface;
+#endif
};
struct wlr_surface *wlr_surface;
// TODO: This would probably be better as a field that's updated on a
diff --git a/include/wlr/types/wlr_keyboard.h b/include/wlr/types/wlr_keyboard.h
index 99a624c2..a6726a7c 100644
--- a/include/wlr/types/wlr_keyboard.h
+++ b/include/wlr/types/wlr_keyboard.h
@@ -3,6 +3,7 @@
#include <wayland-server.h>
#include <stdint.h>
+#include <stdbool.h>
#include <wayland-server.h>
#include <xkbcommon/xkbcommon.h>
diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h
index 9f898b38..03376788 100644
--- a/include/wlr/types/wlr_surface.h
+++ b/include/wlr/types/wlr_surface.h
@@ -122,4 +122,11 @@ void wlr_surface_make_subsurface(struct wlr_surface *surface,
*/
struct wlr_surface *wlr_surface_get_main_surface(struct wlr_surface *surface);
+/**
+ * Find a subsurface within this surface at the surface-local coordinates.
+ * Returns the surface and coordinates in the topmost surface coordinate system
+ * or NULL if no subsurface is found at that location.
+ */
+struct wlr_subsurface *wlr_surface_subsurface_at(struct wlr_surface *surface,
+ double sx, double sy, double *sub_x, double *sub_y);
#endif
diff --git a/include/wlr/types/wlr_xdg_shell_v6.h b/include/wlr/types/wlr_xdg_shell_v6.h
index 00295ec1..48da6604 100644
--- a/include/wlr/types/wlr_xdg_shell_v6.h
+++ b/include/wlr/types/wlr_xdg_shell_v6.h
@@ -206,4 +206,12 @@ void wlr_xdg_toplevel_v6_set_resizing(struct wlr_xdg_surface_v6 *surface,
*/
void wlr_xdg_toplevel_v6_send_close(struct wlr_xdg_surface_v6 *surface);
+/**
+ * Find a popup within this surface at the surface-local coordinates. Returns
+ * the popup and coordinates in the topmost surface coordinate system or NULL if
+ * no popup is found at that location.
+ */
+struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6_popup_at(
+ struct wlr_xdg_surface_v6 *surface, double sx, double sy,
+ double *popup_sx, double *popup_sy);
#endif