From d884f1985c828b4a58e635b3405138e23026de72 Mon Sep 17 00:00:00 2001 From: kotontrion Date: Sat, 28 Sep 2024 16:18:38 +0200 Subject: core: fix astalified container not removing children --- core/gjs/src/astalify.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core') diff --git a/core/gjs/src/astalify.ts b/core/gjs/src/astalify.ts index bfe6623..8778be0 100644 --- a/core/gjs/src/astalify.ts +++ b/core/gjs/src/astalify.ts @@ -19,6 +19,10 @@ function setChildren(parent: Gtk.Widget, children: Gtk.Widget[]) { if (ch) parent.remove(ch) } + else if (parent instanceof Gtk.Container) { + for(const ch of parent.get_children()) + parent.remove(ch) + } // TODO: add more container types if (parent instanceof Astal.Box) { -- cgit v1.2.3