decorations: refactor view_set_decorations

This commit is contained in:
Tobias Bengfort 2024-04-18 09:46:36 +02:00
parent a8f98cb90b
commit 7761d11dae
8 changed files with 78 additions and 49 deletions

View file

@ -48,8 +48,11 @@ xdg_deco_request_mode(struct wl_listener *listener, void *data)
wlr_xdg_toplevel_decoration_v1_set_mode(xdg_deco->wlr_xdg_decoration,
client_mode);
view_set_decorations(xdg_deco->view,
client_mode == WLR_XDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
if (client_mode == WLR_XDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE) {
view_set_decorations(xdg_deco->view, LAB_SSD_MODE_FULL);
} else {
view_set_decorations(xdg_deco->view, LAB_SSD_MODE_NONE);
}
}
static void