summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/ags/faq.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/ags/faq.md b/docs/ags/faq.md
index 56c13e4..ae3e4fc 100644
--- a/docs/ags/faq.md
+++ b/docs/ags/faq.md
@@ -269,3 +269,22 @@ notifd.notifications // ❌ // [!code error]
notifd.get_notifications() // ✅
```
+
+## How to create regular floating windows
+
+Use `Gtk.Window` with [Widget.astalify](/ags/widget#how-to-use-non-builtin-gtk-widgets).
+
+By default `Gtk.Window` is destroyed on close. To prevent this add a handler for `delete-event`.
+
+```tsx {4-7}
+const RegularWindow = Widget.astalify(Gtk.Window)
+
+return <RegularWindow
+ onDeleteEvent={(self) => {
+ self.hide()
+ return true
+ }}
+>
+ {child}
+</RegularWindow>
+```