|
|
@ -1139,12 +1139,18 @@ struct sway_view *view_from_wlr_surface(struct wlr_surface *wlr_surface) {
|
|
|
|
if (wlr_surface_is_xdg_surface(wlr_surface)) {
|
|
|
|
if (wlr_surface_is_xdg_surface(wlr_surface)) {
|
|
|
|
struct wlr_xdg_surface *xdg_surface =
|
|
|
|
struct wlr_xdg_surface *xdg_surface =
|
|
|
|
wlr_xdg_surface_from_wlr_surface(wlr_surface);
|
|
|
|
wlr_xdg_surface_from_wlr_surface(wlr_surface);
|
|
|
|
|
|
|
|
if (xdg_surface == NULL) {
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
}
|
|
|
|
return view_from_wlr_xdg_surface(xdg_surface);
|
|
|
|
return view_from_wlr_xdg_surface(xdg_surface);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#if HAVE_XWAYLAND
|
|
|
|
#if HAVE_XWAYLAND
|
|
|
|
if (wlr_surface_is_xwayland_surface(wlr_surface)) {
|
|
|
|
if (wlr_surface_is_xwayland_surface(wlr_surface)) {
|
|
|
|
struct wlr_xwayland_surface *xsurface =
|
|
|
|
struct wlr_xwayland_surface *xsurface =
|
|
|
|
wlr_xwayland_surface_from_wlr_surface(wlr_surface);
|
|
|
|
wlr_xwayland_surface_from_wlr_surface(wlr_surface);
|
|
|
|
|
|
|
|
if (xsurface == NULL) {
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
}
|
|
|
|
return view_from_wlr_xwayland_surface(xsurface);
|
|
|
|
return view_from_wlr_xwayland_surface(xsurface);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|