diff options
author | Erik Reider <[email protected]> | 2023-07-29 19:13:26 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2023-07-29 13:13:26 -0400 |
commit | c47aa61c64925c72722dfbfa01cd47643a92c7d9 (patch) | |
tree | d3d5e82355452486b6b0532972053c267f17b5d2 | |
parent | fade58b6beb672ddc97240102eec82809eabacc0 (diff) |
fix: not being able to build without xwayland support (#209)
-rw-r--r-- | sway/tree/root.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sway/tree/root.c b/sway/tree/root.c index 2c1b96b8..9df6f002 100644 --- a/sway/tree/root.c +++ b/sway/tree/root.c @@ -58,12 +58,16 @@ void root_destroy(struct sway_root *root) { /* Set minimized state from scratchpad container `show` state */ static void root_scratchpad_set_minimize(struct sway_container *con, bool minimize) { if (con->view) { - struct wlr_foreign_toplevel_handle_v1 *foreign_toplevel = con->view->foreign_toplevel; - +#if HAVE_XWAYLAND if (wlr_surface_is_xwayland_surface(con->view->surface)) { - struct wlr_xwayland_surface *xsurface = wlr_xwayland_surface_from_wlr_surface(con->view->surface); + struct wlr_xwayland_surface *xsurface + = wlr_xwayland_surface_from_wlr_surface(con->view->surface); wlr_xwayland_surface_set_minimized(xsurface, minimize); - } else if (foreign_toplevel) { + return; + } +#endif + struct wlr_foreign_toplevel_handle_v1 *foreign_toplevel = NULL; + if ((foreign_toplevel = con->view->foreign_toplevel)) { wlr_foreign_toplevel_handle_v1_set_minimized(foreign_toplevel, minimize); } } |