This commit is contained in:
2026-01-08 22:44:24 +07:00
parent b5d5793aa8
commit 5173134d51
7 changed files with 66 additions and 34 deletions
+1 -6
View File
@@ -5,19 +5,14 @@
void xdg_decoration_request_mode(struct wl_listener *listener, void *data)
{
struct absinthe_toplevel *toplevel = wl_container_of(listener, toplevel, decoration_request_mode);
if (toplevel->xdg_toplevel->base->initialized) {
if (toplevel->xdg_toplevel->base->initialized)
wlr_xdg_toplevel_decoration_v1_set_mode(toplevel->decoration, WLR_XDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
}
}
void xdg_decoration_destroy(struct wl_listener *listener, void *data)
{
struct absinthe_toplevel *toplevel = wl_container_of(listener, toplevel, decoration_destroy);
for (int i = 0; i < 4; ++i) {
wlr_scene_node_destroy(&toplevel->border[i]->node);
}
wl_list_remove(&toplevel->decoration_request_mode.link);
wl_list_remove(&toplevel->decoration_destroy.link);
}