rootston: fix compilation without XWayland support

In case wlroots is not being compiled with XWayland support, we will not
have an xwayland surface in our roots view. While we make sure to pay
attention to that in some places, we are not being consistent and try to
access the xwayland surface in other places. Obviously, this leads to a
compiler error due to the field not being present.

Fix the issue by sprinkling in a few additional ifdefs where required.
This commit is contained in:
Patrick Steinhardt 2018-01-28 12:04:46 +00:00
parent facc5ef93a
commit 52cb19d99d
4 changed files with 14 additions and 0 deletions

View file

@ -490,6 +490,7 @@ struct roots_desktop *desktop_create(struct roots_server *server,
desktop->server = server;
desktop->config = config;
#ifdef WLR_HAS_XWAYLAND
const char *cursor_theme = NULL;
const char *cursor_default = ROOTS_XCURSOR_DEFAULT;
struct roots_cursor_config *cc =
@ -509,6 +510,7 @@ struct roots_desktop *desktop_create(struct roots_server *server,
free(desktop);
return NULL;
}
#endif
desktop->layout = wlr_output_layout_create();
desktop->layout_change.notify = handle_layout_change;