diff options
author | Pascal Pascher <aur@clouddrop.de> | 2018-07-24 23:37:41 +0200 |
---|---|---|
committer | Pascal Pascher <aur@clouddrop.de> | 2018-07-24 23:37:41 +0200 |
commit | 2bf893248a94c7f70a9557aad4a8228731041eeb (patch) | |
tree | ec86137e1b5881151b20917f311ecce3d24fba8f /sway/tree | |
parent | Added meson option "enable_xwayland" (default: true) to enable/disable xwayla... (diff) | |
download | sway-2bf893248a94c7f70a9557aad4a8228731041eeb.tar.gz sway-2bf893248a94c7f70a9557aad4a8228731041eeb.tar.zst sway-2bf893248a94c7f70a9557aad4a8228731041eeb.zip |
style fixes, exclude sway/desctop/xwayland.c when enable_xwayland: false
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 4 | ||||
-rw-r--r-- | sway/tree/layout.c | 4 | ||||
-rw-r--r-- | sway/tree/view.c | 14 |
3 files changed, 11 insertions, 11 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 0a655db5..b56b4e87 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -527,12 +527,12 @@ static struct sway_container *container_at_view(struct sway_container *swayc, | |||
527 | double _sx, _sy; | 527 | double _sx, _sy; |
528 | struct wlr_surface *_surface = NULL; | 528 | struct wlr_surface *_surface = NULL; |
529 | switch (sview->type) { | 529 | switch (sview->type) { |
530 | #ifdef HAVE_XWAYLAND | 530 | #ifdef HAVE_XWAYLAND |
531 | case SWAY_VIEW_XWAYLAND: | 531 | case SWAY_VIEW_XWAYLAND: |
532 | _surface = wlr_surface_surface_at(sview->surface, | 532 | _surface = wlr_surface_surface_at(sview->surface, |
533 | view_sx, view_sy, &_sx, &_sy); | 533 | view_sx, view_sy, &_sx, &_sy); |
534 | break; | 534 | break; |
535 | #endif | 535 | #endif |
536 | case SWAY_VIEW_XDG_SHELL_V6: | 536 | case SWAY_VIEW_XDG_SHELL_V6: |
537 | _surface = wlr_xdg_surface_v6_surface_at( | 537 | _surface = wlr_xdg_surface_v6_surface_at( |
538 | sview->wlr_xdg_surface_v6, | 538 | sview->wlr_xdg_surface_v6, |
diff --git a/sway/tree/layout.c b/sway/tree/layout.c index 91350c3f..3d361ea5 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c | |||
@@ -39,9 +39,9 @@ void layout_init(void) { | |||
39 | root_container.sway_root = calloc(1, sizeof(*root_container.sway_root)); | 39 | root_container.sway_root = calloc(1, sizeof(*root_container.sway_root)); |
40 | root_container.sway_root->output_layout = wlr_output_layout_create(); | 40 | root_container.sway_root->output_layout = wlr_output_layout_create(); |
41 | wl_list_init(&root_container.sway_root->outputs); | 41 | wl_list_init(&root_container.sway_root->outputs); |
42 | #ifdef HAVE_XWAYLAND | 42 | #ifdef HAVE_XWAYLAND |
43 | wl_list_init(&root_container.sway_root->xwayland_unmanaged); | 43 | wl_list_init(&root_container.sway_root->xwayland_unmanaged); |
44 | #endif | 44 | #endif |
45 | wl_list_init(&root_container.sway_root->drag_icons); | 45 | wl_list_init(&root_container.sway_root->drag_icons); |
46 | wl_signal_init(&root_container.sway_root->events.new_container); | 46 | wl_signal_init(&root_container.sway_root->events.new_container); |
47 | root_container.sway_root->scratchpad = create_list(); | 47 | root_container.sway_root->scratchpad = create_list(); |
diff --git a/sway/tree/view.c b/sway/tree/view.c index e99b938e..2eff80a8 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -138,10 +138,10 @@ const char *view_get_shell(struct sway_view *view) { | |||
138 | return "xdg_shell_v6"; | 138 | return "xdg_shell_v6"; |
139 | case SWAY_VIEW_XDG_SHELL: | 139 | case SWAY_VIEW_XDG_SHELL: |
140 | return "xdg_shell"; | 140 | return "xdg_shell"; |
141 | #ifdef HAVE_XWAYLAND | 141 | #ifdef HAVE_XWAYLAND |
142 | case SWAY_VIEW_XWAYLAND: | 142 | case SWAY_VIEW_XWAYLAND: |
143 | return "xwayland"; | 143 | return "xwayland"; |
144 | #endif | 144 | #endif |
145 | } | 145 | } |
146 | return "unknown"; | 146 | return "unknown"; |
147 | } | 147 | } |
@@ -567,7 +567,7 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) { | |||
567 | } | 567 | } |
568 | 568 | ||
569 | pid_t pid; | 569 | pid_t pid; |
570 | #ifdef HAVE_XWAYLAND | 570 | #ifdef HAVE_XWAYLAND |
571 | if (view->type == SWAY_VIEW_XWAYLAND) { | 571 | if (view->type == SWAY_VIEW_XWAYLAND) { |
572 | struct wlr_xwayland_surface *surf = | 572 | struct wlr_xwayland_surface *surf = |
573 | wlr_xwayland_surface_from_wlr_surface(wlr_surface); | 573 | wlr_xwayland_surface_from_wlr_surface(wlr_surface); |
@@ -577,11 +577,11 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) { | |||
577 | wl_resource_get_client(wlr_surface->resource); | 577 | wl_resource_get_client(wlr_surface->resource); |
578 | wl_client_get_credentials(client, &pid, NULL, NULL); | 578 | wl_client_get_credentials(client, &pid, NULL, NULL); |
579 | } | 579 | } |
580 | #else | 580 | #else |
581 | struct wl_client *client = | 581 | struct wl_client *client = |
582 | wl_resource_get_client(wlr_surface->resource); | 582 | wl_resource_get_client(wlr_surface->resource); |
583 | wl_client_get_credentials(client, &pid, NULL, NULL); | 583 | wl_client_get_credentials(client, &pid, NULL, NULL); |
584 | #endif | 584 | #endif |
585 | 585 | ||
586 | struct sway_seat *seat = input_manager_current_seat(input_manager); | 586 | struct sway_seat *seat = input_manager_current_seat(input_manager); |
587 | struct sway_container *target_sibling = | 587 | struct sway_container *target_sibling = |
@@ -835,13 +835,13 @@ struct sway_view *view_from_wlr_surface(struct wlr_surface *wlr_surface) { | |||
835 | wlr_xdg_surface_v6_from_wlr_surface(wlr_surface); | 835 | wlr_xdg_surface_v6_from_wlr_surface(wlr_surface); |
836 | return view_from_wlr_xdg_surface_v6(xdg_surface_v6); | 836 | return view_from_wlr_xdg_surface_v6(xdg_surface_v6); |
837 | } | 837 | } |
838 | #ifdef HAVE_XWAYLAND | 838 | #ifdef HAVE_XWAYLAND |
839 | if (wlr_surface_is_xwayland_surface(wlr_surface)) { | 839 | if (wlr_surface_is_xwayland_surface(wlr_surface)) { |
840 | struct wlr_xwayland_surface *xsurface = | 840 | struct wlr_xwayland_surface *xsurface = |
841 | wlr_xwayland_surface_from_wlr_surface(wlr_surface); | 841 | wlr_xwayland_surface_from_wlr_surface(wlr_surface); |
842 | return view_from_wlr_xwayland_surface(xsurface); | 842 | return view_from_wlr_xwayland_surface(xsurface); |
843 | } | 843 | } |
844 | #endif | 844 | #endif |
845 | if (wlr_surface_is_subsurface(wlr_surface)) { | 845 | if (wlr_surface_is_subsurface(wlr_surface)) { |
846 | struct wlr_subsurface *subsurface = | 846 | struct wlr_subsurface *subsurface = |
847 | wlr_subsurface_from_wlr_surface(wlr_surface); | 847 | wlr_subsurface_from_wlr_surface(wlr_surface); |