gpui: Add support for floating windows (#39702)

Closes #ISSUE

This allows new windows like the Rules library or the Settings UI window
to appear floating on window managers like hyprland:


https://github.com/user-attachments/assets/628db7f9-4459-4601-85f1-789923831182

Left is with `WindowKind::Floating` and right is with
`WindowKind::Normal`

Release Notes:

- Added support for floating windows on x11 and wayland
This commit is contained in:
Alvaro Parker
2025-10-08 20:48:17 +02:00
committed by GitHub
parent e0eeda11ed
commit 1e149b755f
8 changed files with 67 additions and 5 deletions
+1 -1
View File
@@ -484,7 +484,7 @@ pub fn open_settings_editor(
}),
focus: true,
show: true,
kind: gpui::WindowKind::Normal,
kind: gpui::WindowKind::Floating,
window_background: cx.theme().window_background_appearance(),
window_min_size: Some(size(px(900.), px(750.))), // 4:3 Aspect Ratio
window_bounds: Some(WindowBounds::centered(size(px(900.), px(750.)), cx)),