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/gjs/src') 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 From 0fd6a5f56033f83f246b9dd51c6521bf6f105b8f Mon Sep 17 00:00:00 2001 From: kotontrion Date: Sat, 28 Sep 2024 18:03:31 +0200 Subject: lua: fix astalified container --- core/gjs/src/astalify.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/gjs/src') diff --git a/core/gjs/src/astalify.ts b/core/gjs/src/astalify.ts index 8778be0..a3e5f62 100644 --- a/core/gjs/src/astalify.ts +++ b/core/gjs/src/astalify.ts @@ -19,7 +19,9 @@ function setChildren(parent: Gtk.Widget, children: Gtk.Widget[]) { if (ch) parent.remove(ch) } - else if (parent instanceof Gtk.Container) { + else if (parent instanceof Gtk.container && + !(parent instanceof Astal.Box || + parent instanceof Astal.Stack)) { for(const ch of parent.get_children()) parent.remove(ch) } -- cgit v1.2.3 From 7b4ae28bf0cdf1b5f2b5cf058577f8a81d641c42 Mon Sep 17 00:00:00 2001 From: kotontrion Date: Sat, 28 Sep 2024 18:07:00 +0200 Subject: gjs: astalify fix indentation --- core/gjs/src/astalify.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/gjs/src') diff --git a/core/gjs/src/astalify.ts b/core/gjs/src/astalify.ts index a3e5f62..d1c8df5 100644 --- a/core/gjs/src/astalify.ts +++ b/core/gjs/src/astalify.ts @@ -24,7 +24,7 @@ function setChildren(parent: Gtk.Widget, children: Gtk.Widget[]) { parent instanceof Astal.Stack)) { for(const ch of parent.get_children()) parent.remove(ch) - } + } // TODO: add more container types if (parent instanceof Astal.Box) { -- cgit v1.2.3