aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree')
-rw-r--r--sway/tree/view.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 2894fa79..db902562 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -526,7 +526,7 @@ static void view_populate_pid(struct sway_view *view) {
526#if HAVE_XWAYLAND 526#if HAVE_XWAYLAND
527 case SWAY_VIEW_XWAYLAND:; 527 case SWAY_VIEW_XWAYLAND:;
528 struct wlr_xwayland_surface *surf = 528 struct wlr_xwayland_surface *surf =
529 wlr_xwayland_surface_from_wlr_surface(view->surface); 529 wlr_xwayland_surface_try_from_wlr_surface(view->surface);
530 pid = surf->pid; 530 pid = surf->pid;
531 break; 531 break;
532#endif 532#endif
@@ -853,9 +853,8 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface,
853 bool set_focus = should_focus(view); 853 bool set_focus = should_focus(view);
854 854
855#if HAVE_XWAYLAND 855#if HAVE_XWAYLAND
856 if (wlr_surface_is_xwayland_surface(wlr_surface)) { 856 struct wlr_xwayland_surface *xsurface;
857 struct wlr_xwayland_surface *xsurface = 857 if ((xsurface = wlr_xwayland_surface_try_from_wlr_surface(wlr_surface))) {
858 wlr_xwayland_surface_from_wlr_surface(wlr_surface);
859 set_focus &= wlr_xwayland_icccm_input_model(xsurface) != 858 set_focus &= wlr_xwayland_icccm_input_model(xsurface) !=
860 WLR_ICCCM_INPUT_MODEL_NONE; 859 WLR_ICCCM_INPUT_MODEL_NONE;
861 } 860 }
@@ -1197,12 +1196,8 @@ struct sway_view *view_from_wlr_surface(struct wlr_surface *wlr_surface) {
1197 return view_from_wlr_xdg_surface(xdg_surface); 1196 return view_from_wlr_xdg_surface(xdg_surface);
1198 } 1197 }
1199#if HAVE_XWAYLAND 1198#if HAVE_XWAYLAND
1200 if (wlr_surface_is_xwayland_surface(wlr_surface)) { 1199 struct wlr_xwayland_surface *xsurface;
1201 struct wlr_xwayland_surface *xsurface = 1200 if ((xsurface = wlr_xwayland_surface_try_from_wlr_surface(wlr_surface))) {
1202 wlr_xwayland_surface_from_wlr_surface(wlr_surface);
1203 if (xsurface == NULL) {
1204 return NULL;
1205 }
1206 return view_from_wlr_xwayland_surface(xsurface); 1201 return view_from_wlr_xwayland_surface(xsurface);
1207 } 1202 }
1208#endif 1203#endif