fix: crash when moving tabbed container to scratchpad (#182)
when `scratchpad_minimize` enabled
This commit is contained in:
parent
15bf6ae835
commit
6a6cf2841c
|
@ -57,7 +57,9 @@ 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 (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);
|
||||
|
@ -65,6 +67,7 @@ static void root_scratchpad_set_minimize(struct sway_container *con, bool minimi
|
|||
wlr_foreign_toplevel_handle_v1_set_minimized(foreign_toplevel, minimize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void root_scratchpad_add_container(struct sway_container *con, struct sway_workspace *ws) {
|
||||
if (!sway_assert(!con->scratchpad, "Container is already in scratchpad")) {
|
||||
|
|
Loading…
Reference in a new issue