diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-29 20:04:24 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-29 20:04:24 +1000 |
commit | a2fbb20a616444213ff3967b33eed7f4561e3978 (patch) | |
tree | 276a133eb78d6e0655bc164693650454d43a22ca /sway/server.c | |
parent | 3c81a900b766dd2c049ba7af6e603805893e0926 (diff) | |
parent | d3ea07f8283385d015e1d85b5fe9bc8a776fc7b4 (diff) |
Merge remote-tracking branch 'upstream/master' into atomic
Diffstat (limited to 'sway/server.c')
-rw-r--r-- | sway/server.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sway/server.c b/sway/server.c index 884d971e..f5700c09 100644 --- a/sway/server.c +++ b/sway/server.c @@ -19,13 +19,12 @@ #include <wlr/types/wlr_xdg_output.h> #include <wlr/util/log.h> // TODO WLR: make Xwayland optional -#include <wlr/xwayland.h> #include "list.h" #include "sway/config.h" #include "sway/input/input-manager.h" #include "sway/server.h" #include "sway/tree/layout.h" - +#include "sway/xwayland.h" bool server_privileged_prepare(struct sway_server *server) { wlr_log(L_DEBUG, "Preparing Wayland server initialization"); @@ -79,20 +78,23 @@ bool server_init(struct sway_server *server) { server->xdg_shell_surface.notify = handle_xdg_shell_surface; // TODO make xwayland optional - server->xwayland = + server->xwayland.wlr_xwayland = wlr_xwayland_create(server->wl_display, server->compositor, true); - wl_signal_add(&server->xwayland->events.new_surface, + wl_signal_add(&server->xwayland.wlr_xwayland->events.new_surface, &server->xwayland_surface); server->xwayland_surface.notify = handle_xwayland_surface; + wl_signal_add(&server->xwayland.wlr_xwayland->events.ready, + &server->xwayland_ready); + server->xwayland_ready.notify = handle_xwayland_ready; // TODO: configurable cursor theme and size - server->xcursor_manager = wlr_xcursor_manager_create(NULL, 24); - wlr_xcursor_manager_load(server->xcursor_manager, 1); + server->xwayland.xcursor_manager = wlr_xcursor_manager_create(NULL, 24); + wlr_xcursor_manager_load(server->xwayland.xcursor_manager, 1); struct wlr_xcursor *xcursor = wlr_xcursor_manager_get_xcursor( - server->xcursor_manager, "left_ptr", 1); + server->xwayland.xcursor_manager, "left_ptr", 1); if (xcursor != NULL) { struct wlr_xcursor_image *image = xcursor->images[0]; - wlr_xwayland_set_cursor(server->xwayland, image->buffer, + wlr_xwayland_set_cursor(server->xwayland.wlr_xwayland, image->buffer, image->width * 4, image->width, image->height, image->hotspot_x, image->hotspot_y); } |