Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright © 2010-2012 Intel Corporation |
| 3 | * Copyright © 2011-2012 Collabora, Ltd. |
| 4 | * Copyright © 2013 Raspberry Pi Foundation |
| 5 | * Copyright © 2016 Quentin "Sardem FF7" Glidic |
| 6 | * |
| 7 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 8 | * copy of this software and associated documentation files (the "Software"), |
| 9 | * to deal in the Software without restriction, including without limitation |
| 10 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 11 | * and/or sell copies of the Software, and to permit persons to whom the |
| 12 | * Software is furnished to do so, subject to the following conditions: |
| 13 | * |
| 14 | * The above copyright notice and this permission notice (including the next |
| 15 | * paragraph) shall be included in all copies or substantial portions of the |
| 16 | * Software. |
| 17 | * |
| 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 21 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 24 | * DEALINGS IN THE SOFTWARE. |
| 25 | */ |
| 26 | |
| 27 | #include "config.h" |
| 28 | |
| 29 | #include <assert.h> |
| 30 | |
| 31 | #include <wayland-server.h> |
| 32 | |
| 33 | #include "compositor.h" |
| 34 | #include "zalloc.h" |
| 35 | |
| 36 | #include "libweston-desktop.h" |
| 37 | #include "internal.h" |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 38 | #include "xwayland/xwayland-internal-interface.h" |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 39 | |
| 40 | enum weston_desktop_xwayland_surface_state { |
| 41 | NONE, |
| 42 | TOPLEVEL, |
| 43 | MAXIMIZED, |
| 44 | FULLSCREEN, |
| 45 | TRANSIENT, |
| 46 | XWAYLAND, |
| 47 | }; |
| 48 | |
| 49 | struct weston_desktop_xwayland { |
| 50 | struct weston_desktop *desktop; |
| 51 | struct weston_desktop_client *client; |
| 52 | struct weston_layer layer; |
| 53 | }; |
| 54 | |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 55 | struct weston_desktop_xwayland_surface { |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 56 | struct weston_desktop_xwayland *xwayland; |
| 57 | struct weston_desktop *desktop; |
| 58 | struct weston_desktop_surface *surface; |
| 59 | struct wl_listener resource_destroy_listener; |
| 60 | struct weston_view *view; |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 61 | const struct weston_xwayland_client_interface *client_interface; |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 62 | struct weston_geometry next_geometry; |
| 63 | bool has_next_geometry; |
| 64 | bool added; |
| 65 | enum weston_desktop_xwayland_surface_state state; |
| 66 | }; |
| 67 | |
| 68 | static void |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 69 | weston_desktop_xwayland_surface_change_state(struct weston_desktop_xwayland_surface *surface, |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 70 | enum weston_desktop_xwayland_surface_state state, |
| 71 | struct weston_desktop_surface *parent, |
| 72 | int32_t x, int32_t y) |
| 73 | { |
| 74 | bool to_add = (parent == NULL && state != XWAYLAND); |
| 75 | |
| 76 | assert(state != NONE); |
Pekka Paalanen | a838b78 | 2016-11-15 11:43:36 +0200 | [diff] [blame^] | 77 | assert(!parent || state == TRANSIENT); |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 78 | |
Quentin Glidic | 6384edf | 2016-08-16 11:42:47 +0200 | [diff] [blame] | 79 | if (to_add && surface->added) { |
| 80 | surface->state = state; |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 81 | return; |
Quentin Glidic | 6384edf | 2016-08-16 11:42:47 +0200 | [diff] [blame] | 82 | } |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 83 | |
| 84 | if (surface->state != state) { |
| 85 | if (surface->state == XWAYLAND) { |
Quentin Glidic | f01ecee | 2016-08-16 10:52:46 +0200 | [diff] [blame] | 86 | weston_desktop_surface_unlink_view(surface->view); |
Quentin Glidic | f6636a8 | 2016-08-16 10:55:02 +0200 | [diff] [blame] | 87 | weston_view_destroy(surface->view); |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 88 | surface->view = NULL; |
| 89 | } |
| 90 | |
| 91 | if (to_add) { |
| 92 | weston_desktop_surface_unset_relative_to(surface->surface); |
| 93 | weston_desktop_api_surface_added(surface->desktop, |
| 94 | surface->surface); |
| 95 | } else if (surface->added) { |
| 96 | weston_desktop_api_surface_removed(surface->desktop, |
| 97 | surface->surface); |
| 98 | } |
| 99 | |
| 100 | if (state == XWAYLAND) { |
| 101 | surface->view = |
| 102 | weston_desktop_surface_create_view(surface->surface); |
| 103 | weston_layer_entry_insert(&surface->xwayland->layer.view_list, |
| 104 | &surface->view->layer_link); |
| 105 | weston_view_set_position(surface->view, x, y); |
| 106 | } |
| 107 | |
| 108 | surface->state = state; |
| 109 | surface->added = to_add; |
| 110 | } |
| 111 | |
| 112 | if (parent != NULL) |
| 113 | weston_desktop_surface_set_relative_to(surface->surface, parent, |
| 114 | x, y, false); |
| 115 | } |
| 116 | |
| 117 | static void |
| 118 | weston_desktop_xwayland_surface_committed(struct weston_desktop_surface *dsurface, |
Quentin Glidic | 003da88 | 2016-08-15 12:21:39 +0200 | [diff] [blame] | 119 | void *user_data, |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 120 | int32_t sx, int32_t sy) |
| 121 | { |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 122 | struct weston_desktop_xwayland_surface *surface = user_data; |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 123 | |
| 124 | if (surface->has_next_geometry) { |
| 125 | surface->has_next_geometry = false; |
| 126 | weston_desktop_surface_set_geometry(surface->surface, |
| 127 | surface->next_geometry); |
| 128 | } |
| 129 | |
| 130 | if (surface->added) |
| 131 | weston_desktop_api_committed(surface->desktop, surface->surface, |
| 132 | sx, sy); |
| 133 | } |
| 134 | |
| 135 | static void |
| 136 | weston_desktop_xwayland_surface_set_size(struct weston_desktop_surface *dsurface, |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 137 | void *user_data, |
| 138 | int32_t width, int32_t height) |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 139 | { |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 140 | struct weston_desktop_xwayland_surface *surface = user_data; |
| 141 | struct weston_surface *wsurface = |
| 142 | weston_desktop_surface_get_surface(surface->surface); |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 143 | |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 144 | surface->client_interface->send_configure(wsurface, width, height); |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 145 | } |
| 146 | |
| 147 | static void |
| 148 | weston_desktop_xwayland_surface_destroy(struct weston_desktop_surface *dsurface, |
| 149 | void *user_data) |
| 150 | { |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 151 | struct weston_desktop_xwayland_surface *surface = user_data; |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 152 | |
| 153 | wl_list_remove(&surface->resource_destroy_listener.link); |
| 154 | |
| 155 | weston_desktop_surface_unset_relative_to(surface->surface); |
Quentin Glidic | 1714f01 | 2016-08-18 16:45:30 +0200 | [diff] [blame] | 156 | if (surface->added) |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 157 | weston_desktop_api_surface_removed(surface->desktop, |
| 158 | surface->surface); |
Quentin Glidic | 1714f01 | 2016-08-18 16:45:30 +0200 | [diff] [blame] | 159 | else if (surface->state == XWAYLAND) |
Quentin Glidic | f01ecee | 2016-08-16 10:52:46 +0200 | [diff] [blame] | 160 | weston_desktop_surface_unlink_view(surface->view); |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 161 | |
| 162 | free(surface); |
| 163 | } |
| 164 | |
| 165 | static bool |
| 166 | weston_desktop_xwayland_surface_get_maximized(struct weston_desktop_surface *dsurface, |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 167 | void *user_data) |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 168 | { |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 169 | struct weston_desktop_xwayland_surface *surface = user_data; |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 170 | |
| 171 | return surface->state == MAXIMIZED; |
| 172 | } |
| 173 | |
| 174 | static bool |
| 175 | weston_desktop_xwayland_surface_get_fullscreen(struct weston_desktop_surface *dsurface, |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 176 | void *user_data) |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 177 | { |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 178 | struct weston_desktop_xwayland_surface *surface = user_data; |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 179 | |
| 180 | return surface->state == FULLSCREEN; |
| 181 | } |
| 182 | |
| 183 | static const struct weston_desktop_surface_implementation weston_desktop_xwayland_surface_internal_implementation = { |
| 184 | .committed = weston_desktop_xwayland_surface_committed, |
| 185 | .set_size = weston_desktop_xwayland_surface_set_size, |
| 186 | |
| 187 | .get_maximized = weston_desktop_xwayland_surface_get_maximized, |
| 188 | .get_fullscreen = weston_desktop_xwayland_surface_get_fullscreen, |
| 189 | |
| 190 | .destroy = weston_desktop_xwayland_surface_destroy, |
| 191 | }; |
| 192 | |
| 193 | static void |
| 194 | weston_destop_xwayland_resource_destroyed(struct wl_listener *listener, |
| 195 | void *data) |
| 196 | { |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 197 | struct weston_desktop_xwayland_surface *surface = |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 198 | wl_container_of(listener, surface, resource_destroy_listener); |
| 199 | |
| 200 | weston_desktop_surface_destroy(surface->surface); |
| 201 | } |
| 202 | |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 203 | static struct weston_desktop_xwayland_surface * |
| 204 | create_surface(struct weston_desktop_xwayland *xwayland, |
| 205 | struct weston_surface *wsurface, |
| 206 | const struct weston_xwayland_client_interface *client_interface) |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 207 | { |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 208 | struct weston_desktop_xwayland_surface *surface; |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 209 | |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 210 | surface = zalloc(sizeof(struct weston_desktop_xwayland_surface)); |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 211 | if (surface == NULL) |
| 212 | return NULL; |
| 213 | |
| 214 | surface->xwayland = xwayland; |
| 215 | surface->desktop = xwayland->desktop; |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 216 | surface->client_interface = client_interface; |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 217 | |
| 218 | surface->surface = |
| 219 | weston_desktop_surface_create(surface->desktop, |
| 220 | xwayland->client, wsurface, |
| 221 | &weston_desktop_xwayland_surface_internal_implementation, |
| 222 | surface); |
| 223 | if (surface->surface == NULL) { |
| 224 | free(surface); |
| 225 | return NULL; |
| 226 | } |
| 227 | |
| 228 | surface->resource_destroy_listener.notify = |
| 229 | weston_destop_xwayland_resource_destroyed; |
| 230 | wl_resource_add_destroy_listener(wsurface->resource, |
| 231 | &surface->resource_destroy_listener); |
| 232 | |
| 233 | return surface; |
| 234 | } |
| 235 | |
| 236 | static void |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 237 | set_toplevel(struct weston_desktop_xwayland_surface *surface) |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 238 | { |
| 239 | weston_desktop_xwayland_surface_change_state(surface, TOPLEVEL, NULL, |
| 240 | 0, 0); |
| 241 | } |
| 242 | |
| 243 | static void |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 244 | set_parent(struct weston_desktop_xwayland_surface *surface, |
| 245 | struct weston_surface *wparent) |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 246 | { |
| 247 | struct weston_desktop_surface *parent; |
| 248 | |
| 249 | if (!weston_surface_is_desktop_surface(wparent)) |
| 250 | return; |
| 251 | |
| 252 | parent = weston_surface_get_desktop_surface(wparent); |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 253 | weston_desktop_api_set_parent(surface->desktop, surface->surface, parent); |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 254 | } |
| 255 | |
| 256 | static void |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 257 | set_transient(struct weston_desktop_xwayland_surface *surface, |
| 258 | struct weston_surface *wparent, int x, int y) |
| 259 | { |
| 260 | struct weston_desktop_surface *parent; |
| 261 | |
| 262 | if (!weston_surface_is_desktop_surface(wparent)) |
| 263 | return; |
| 264 | |
| 265 | parent = weston_surface_get_desktop_surface(wparent); |
| 266 | weston_desktop_xwayland_surface_change_state(surface, TRANSIENT, parent, |
| 267 | x, y); |
| 268 | } |
| 269 | |
| 270 | static void |
| 271 | set_fullscreen(struct weston_desktop_xwayland_surface *surface, |
| 272 | struct weston_output *output) |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 273 | { |
| 274 | weston_desktop_xwayland_surface_change_state(surface, FULLSCREEN, NULL, |
| 275 | 0, 0); |
| 276 | weston_desktop_api_fullscreen_requested(surface->desktop, |
| 277 | surface->surface, true, output); |
| 278 | } |
| 279 | |
| 280 | static void |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 281 | set_xwayland(struct weston_desktop_xwayland_surface *surface, int x, int y) |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 282 | { |
| 283 | weston_desktop_xwayland_surface_change_state(surface, XWAYLAND, NULL, |
| 284 | x, y); |
| 285 | } |
| 286 | |
| 287 | static int |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 288 | move(struct weston_desktop_xwayland_surface *surface, |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 289 | struct weston_pointer *pointer) |
| 290 | { |
| 291 | if (surface->state == TOPLEVEL || |
| 292 | surface->state == MAXIMIZED || |
| 293 | surface->state == FULLSCREEN) |
| 294 | weston_desktop_api_move(surface->desktop, surface->surface, |
| 295 | pointer->seat, pointer->grab_serial); |
| 296 | return 0; |
| 297 | } |
| 298 | |
| 299 | static int |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 300 | resize(struct weston_desktop_xwayland_surface *surface, |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 301 | struct weston_pointer *pointer, uint32_t edges) |
| 302 | { |
| 303 | if (surface->state == TOPLEVEL || |
| 304 | surface->state == MAXIMIZED || |
| 305 | surface->state == FULLSCREEN) |
| 306 | weston_desktop_api_resize(surface->desktop, surface->surface, |
| 307 | pointer->seat, pointer->grab_serial, |
| 308 | edges); |
| 309 | return 0; |
| 310 | } |
| 311 | |
| 312 | static void |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 313 | set_title(struct weston_desktop_xwayland_surface *surface, const char *title) |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 314 | { |
| 315 | weston_desktop_surface_set_title(surface->surface, title); |
| 316 | } |
| 317 | |
| 318 | static void |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 319 | set_window_geometry(struct weston_desktop_xwayland_surface *surface, |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 320 | int32_t x, int32_t y, int32_t width, int32_t height) |
| 321 | { |
| 322 | surface->has_next_geometry = true; |
| 323 | surface->next_geometry.x = x; |
| 324 | surface->next_geometry.y = y; |
| 325 | surface->next_geometry.width = width; |
| 326 | surface->next_geometry.height = height; |
| 327 | } |
| 328 | |
| 329 | static void |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 330 | set_maximized(struct weston_desktop_xwayland_surface *surface) |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 331 | { |
| 332 | weston_desktop_xwayland_surface_change_state(surface, MAXIMIZED, NULL, |
| 333 | 0, 0); |
| 334 | weston_desktop_api_maximized_requested(surface->desktop, |
| 335 | surface->surface, true); |
| 336 | } |
| 337 | |
| 338 | static void |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 339 | set_pid(struct weston_desktop_xwayland_surface *surface, pid_t pid) |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 340 | { |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 341 | weston_desktop_surface_set_pid(surface->surface, pid); |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 342 | } |
| 343 | |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 344 | static const struct weston_desktop_xwayland_interface weston_desktop_xwayland_interface = { |
| 345 | .create_surface = create_surface, |
| 346 | .set_toplevel = set_toplevel, |
| 347 | .set_parent = set_parent, |
| 348 | .set_transient = set_transient, |
| 349 | .set_fullscreen = set_fullscreen, |
| 350 | .set_xwayland = set_xwayland, |
| 351 | .move = move, |
| 352 | .resize = resize, |
| 353 | .set_title = set_title, |
| 354 | .set_window_geometry = set_window_geometry, |
| 355 | .set_maximized = set_maximized, |
| 356 | .set_pid = set_pid, |
| 357 | }; |
| 358 | |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 359 | void |
| 360 | weston_desktop_xwayland_init(struct weston_desktop *desktop) |
| 361 | { |
| 362 | struct weston_compositor *compositor = weston_desktop_get_compositor(desktop); |
| 363 | struct weston_desktop_xwayland *xwayland; |
| 364 | |
| 365 | xwayland = zalloc(sizeof(struct weston_desktop_xwayland)); |
| 366 | if (xwayland == NULL) |
| 367 | return; |
| 368 | |
| 369 | xwayland->desktop = desktop; |
| 370 | xwayland->client = weston_desktop_client_create(desktop, NULL, NULL, NULL, NULL, 0, 0); |
| 371 | |
| 372 | weston_layer_init(&xwayland->layer, &compositor->cursor_layer.link); |
| 373 | |
Quentin Glidic | 955cec0 | 2016-08-12 10:41:35 +0200 | [diff] [blame] | 374 | compositor->xwayland = xwayland; |
| 375 | compositor->xwayland_interface = &weston_desktop_xwayland_interface; |
Quentin Glidic | 248dd10 | 2016-08-12 10:41:34 +0200 | [diff] [blame] | 376 | } |