diff options
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/xwayland.h | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/include/wlr/xwayland.h b/include/wlr/xwayland.h index 8646e7ac..c4c5842c 100644 --- a/include/wlr/xwayland.h +++ b/include/wlr/xwayland.h @@ -18,14 +18,11 @@ struct wlr_xwm; struct wlr_xwayland_cursor; -struct wlr_gtk_primary_selection_device_manager; -struct wlr_xwayland { +struct wlr_xwayland_server { pid_t pid; struct wl_client *client; struct wl_event_source *sigusr1_source; - struct wlr_xwm *xwm; - struct wlr_xwayland_cursor *cursor; int wm_fd[2], wl_fd[2]; time_t server_start; @@ -39,6 +36,31 @@ struct wlr_xwayland { bool lazy; struct wl_display *wl_display; + + struct { + struct wl_signal ready; + struct wl_signal destroy; + } events; + + struct wl_listener client_destroy; + struct wl_listener display_destroy; + + void *data; +}; + +struct wlr_xwayland_server_ready_event { + struct wlr_xwayland_server *server; + int wm_fd; +}; + +struct wlr_xwayland { + struct wlr_xwayland_server *server; + struct wlr_xwm *xwm; + struct wlr_xwayland_cursor *cursor; + + const char *display_name; + + struct wl_display *wl_display; struct wlr_compositor *compositor; struct wlr_seat *seat; @@ -54,8 +76,9 @@ struct wlr_xwayland { */ int (*user_event_handler)(struct wlr_xwm *xwm, xcb_generic_event_t *event); + struct wl_listener server_ready; + struct wl_listener server_destroy; struct wl_listener client_destroy; - struct wl_listener display_destroy; struct wl_listener seat_destroy; void *data; @@ -192,7 +215,11 @@ struct wlr_xwayland_resize_event { uint32_t edges; }; -/** Create an Xwayland server. +struct wlr_xwayland_server *wlr_xwayland_server_create( + struct wl_display *display, bool lazy); +void wlr_xwayland_server_destroy(struct wlr_xwayland_server *server); + +/** Create an Xwayland server and XWM. * * The server supports a lazy mode in which Xwayland is only started when a * client tries to connect. |