summaryrefslogtreecommitdiffstats
path: root/sway/server.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-29 20:04:24 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-29 20:04:24 +1000
commita2fbb20a616444213ff3967b33eed7f4561e3978 (patch)
tree276a133eb78d6e0655bc164693650454d43a22ca /sway/server.c
parentAdd comment about usage to arrange_windows declaration (diff)
parentMerge pull request #2172 from apreiml/fix-keybinding-modifier-handling (diff)
downloadsway-a2fbb20a616444213ff3967b33eed7f4561e3978.tar.gz
sway-a2fbb20a616444213ff3967b33eed7f4561e3978.tar.zst
sway-a2fbb20a616444213ff3967b33eed7f4561e3978.zip
Merge remote-tracking branch 'upstream/master' into atomic
Diffstat (limited to 'sway/server.c')
-rw-r--r--sway/server.c18
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 @@
19#include <wlr/types/wlr_xdg_output.h> 19#include <wlr/types/wlr_xdg_output.h>
20#include <wlr/util/log.h> 20#include <wlr/util/log.h>
21// TODO WLR: make Xwayland optional 21// TODO WLR: make Xwayland optional
22#include <wlr/xwayland.h>
23#include "list.h" 22#include "list.h"
24#include "sway/config.h" 23#include "sway/config.h"
25#include "sway/input/input-manager.h" 24#include "sway/input/input-manager.h"
26#include "sway/server.h" 25#include "sway/server.h"
27#include "sway/tree/layout.h" 26#include "sway/tree/layout.h"
28 27#include "sway/xwayland.h"
29 28
30bool server_privileged_prepare(struct sway_server *server) { 29bool server_privileged_prepare(struct sway_server *server) {
31 wlr_log(L_DEBUG, "Preparing Wayland server initialization"); 30 wlr_log(L_DEBUG, "Preparing Wayland server initialization");
@@ -79,20 +78,23 @@ bool server_init(struct sway_server *server) {
79 server->xdg_shell_surface.notify = handle_xdg_shell_surface; 78 server->xdg_shell_surface.notify = handle_xdg_shell_surface;
80 79
81 // TODO make xwayland optional 80 // TODO make xwayland optional
82 server->xwayland = 81 server->xwayland.wlr_xwayland =
83 wlr_xwayland_create(server->wl_display, server->compositor, true); 82 wlr_xwayland_create(server->wl_display, server->compositor, true);
84 wl_signal_add(&server->xwayland->events.new_surface, 83 wl_signal_add(&server->xwayland.wlr_xwayland->events.new_surface,
85 &server->xwayland_surface); 84 &server->xwayland_surface);
86 server->xwayland_surface.notify = handle_xwayland_surface; 85 server->xwayland_surface.notify = handle_xwayland_surface;
86 wl_signal_add(&server->xwayland.wlr_xwayland->events.ready,
87 &server->xwayland_ready);
88 server->xwayland_ready.notify = handle_xwayland_ready;
87 89
88 // TODO: configurable cursor theme and size 90 // TODO: configurable cursor theme and size
89 server->xcursor_manager = wlr_xcursor_manager_create(NULL, 24); 91 server->xwayland.xcursor_manager = wlr_xcursor_manager_create(NULL, 24);
90 wlr_xcursor_manager_load(server->xcursor_manager, 1); 92 wlr_xcursor_manager_load(server->xwayland.xcursor_manager, 1);
91 struct wlr_xcursor *xcursor = wlr_xcursor_manager_get_xcursor( 93 struct wlr_xcursor *xcursor = wlr_xcursor_manager_get_xcursor(
92 server->xcursor_manager, "left_ptr", 1); 94 server->xwayland.xcursor_manager, "left_ptr", 1);
93 if (xcursor != NULL) { 95 if (xcursor != NULL) {
94 struct wlr_xcursor_image *image = xcursor->images[0]; 96 struct wlr_xcursor_image *image = xcursor->images[0];
95 wlr_xwayland_set_cursor(server->xwayland, image->buffer, 97 wlr_xwayland_set_cursor(server->xwayland.wlr_xwayland, image->buffer,
96 image->width * 4, image->width, image->height, image->hotspot_x, 98 image->width * 4, image->width, image->height, image->hotspot_x,
97 image->hotspot_y); 99 image->hotspot_y);
98 } 100 }