From afd2611ed2bc9542e7c6ee1389c9790ee9a88a1a Mon Sep 17 00:00:00 2001 From: Erik Reider Date: Tue, 21 Mar 2023 16:20:35 +0100 Subject: [PATCH] Fixed not properly checking if window is ran though XWayland --- sway/tree/root.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sway/tree/root.c b/sway/tree/root.c index adf4124a..4d007bf9 100644 --- a/sway/tree/root.c +++ b/sway/tree/root.c @@ -58,8 +58,8 @@ 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) { struct wlr_foreign_toplevel_handle_v1 *foreign_toplevel = con->view->foreign_toplevel; - struct wlr_xwayland_surface *xsurface = con->view->wlr_xwayland_surface; - if (xsurface) { + if (wlr_surface_is_xwayland_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) { wlr_foreign_toplevel_handle_v1_set_minimized(foreign_toplevel, minimize);