mirror of
https://github.com/swaywm/sway.git
synced 2025-11-16 06:59:49 -05:00
style fixes, exclude sway/desctop/xwayland.c when enable_xwayland: false
This commit is contained in:
parent
24ad1c3983
commit
2bf893248a
17 changed files with 51 additions and 50 deletions
|
|
@ -527,12 +527,12 @@ static struct sway_container *container_at_view(struct sway_container *swayc,
|
|||
double _sx, _sy;
|
||||
struct wlr_surface *_surface = NULL;
|
||||
switch (sview->type) {
|
||||
#ifdef HAVE_XWAYLAND
|
||||
#ifdef HAVE_XWAYLAND
|
||||
case SWAY_VIEW_XWAYLAND:
|
||||
_surface = wlr_surface_surface_at(sview->surface,
|
||||
view_sx, view_sy, &_sx, &_sy);
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
case SWAY_VIEW_XDG_SHELL_V6:
|
||||
_surface = wlr_xdg_surface_v6_surface_at(
|
||||
sview->wlr_xdg_surface_v6,
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ void layout_init(void) {
|
|||
root_container.sway_root = calloc(1, sizeof(*root_container.sway_root));
|
||||
root_container.sway_root->output_layout = wlr_output_layout_create();
|
||||
wl_list_init(&root_container.sway_root->outputs);
|
||||
#ifdef HAVE_XWAYLAND
|
||||
#ifdef HAVE_XWAYLAND
|
||||
wl_list_init(&root_container.sway_root->xwayland_unmanaged);
|
||||
#endif
|
||||
#endif
|
||||
wl_list_init(&root_container.sway_root->drag_icons);
|
||||
wl_signal_init(&root_container.sway_root->events.new_container);
|
||||
root_container.sway_root->scratchpad = create_list();
|
||||
|
|
|
|||
|
|
@ -138,10 +138,10 @@ const char *view_get_shell(struct sway_view *view) {
|
|||
return "xdg_shell_v6";
|
||||
case SWAY_VIEW_XDG_SHELL:
|
||||
return "xdg_shell";
|
||||
#ifdef HAVE_XWAYLAND
|
||||
#ifdef HAVE_XWAYLAND
|
||||
case SWAY_VIEW_XWAYLAND:
|
||||
return "xwayland";
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
|
@ -567,7 +567,7 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) {
|
|||
}
|
||||
|
||||
pid_t pid;
|
||||
#ifdef HAVE_XWAYLAND
|
||||
#ifdef HAVE_XWAYLAND
|
||||
if (view->type == SWAY_VIEW_XWAYLAND) {
|
||||
struct wlr_xwayland_surface *surf =
|
||||
wlr_xwayland_surface_from_wlr_surface(wlr_surface);
|
||||
|
|
@ -577,11 +577,11 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) {
|
|||
wl_resource_get_client(wlr_surface->resource);
|
||||
wl_client_get_credentials(client, &pid, NULL, NULL);
|
||||
}
|
||||
#else
|
||||
#else
|
||||
struct wl_client *client =
|
||||
wl_resource_get_client(wlr_surface->resource);
|
||||
wl_client_get_credentials(client, &pid, NULL, NULL);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct sway_seat *seat = input_manager_current_seat(input_manager);
|
||||
struct sway_container *target_sibling =
|
||||
|
|
@ -835,13 +835,13 @@ struct sway_view *view_from_wlr_surface(struct wlr_surface *wlr_surface) {
|
|||
wlr_xdg_surface_v6_from_wlr_surface(wlr_surface);
|
||||
return view_from_wlr_xdg_surface_v6(xdg_surface_v6);
|
||||
}
|
||||
#ifdef HAVE_XWAYLAND
|
||||
#ifdef HAVE_XWAYLAND
|
||||
if (wlr_surface_is_xwayland_surface(wlr_surface)) {
|
||||
struct wlr_xwayland_surface *xsurface =
|
||||
wlr_xwayland_surface_from_wlr_surface(wlr_surface);
|
||||
return view_from_wlr_xwayland_surface(xsurface);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
if (wlr_surface_is_subsurface(wlr_surface)) {
|
||||
struct wlr_subsurface *subsurface =
|
||||
wlr_subsurface_from_wlr_surface(wlr_surface);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue