aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authorLibravatar Pascal Pascher <aur@clouddrop.de>2018-07-24 23:37:41 +0200
committerLibravatar Pascal Pascher <aur@clouddrop.de>2018-07-24 23:37:41 +0200
commit2bf893248a94c7f70a9557aad4a8228731041eeb (patch)
treeec86137e1b5881151b20917f311ecce3d24fba8f /sway/tree/view.c
parentAdded meson option "enable_xwayland" (default: true) to enable/disable xwayla... (diff)
downloadsway-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/view.c')
-rw-r--r--sway/tree/view.c14
1 files changed, 7 insertions, 7 deletions
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);