e69f9d6cf9da4cac8d8101215db94808b5f01a54
By leveraging the `_GTK_EDGE_CONSTRAINTS` atom we can get all four booleans for the `Tiling` struct and figure out which side is free when the window is tiled to half of the screen. For the logic behind the `_GTK_EDGE_CONSTRAINTS` see: - https://github.com/GNOME/mutter/blob/8e9d13aa3b3baa099ca32bbcb10afb4d9eea4460/src/x11/window-x11.c#L65-L75 - https://github.com/GNOME/mutter/blob/8e9d13aa3b3baa099ca32bbcb10afb4d9eea4460/src/x11/window-x11.c#L1205-L1231 (I used Claude 3.5 Sonnet with our code and these pieces from `mutter` to generate the Rust code, that was pretty sweet) This fixes the gap in the middle when a GPUI window is tiled to the left and another window to the right. It's not _perfect_ but it looks a lot better. Here's a diff that makes it look better: ```diff diff --git a/crates/gpui/examples/window_shadow.rs b/crates/gpui/examples/window_shadow.rs index 122231f6b..7fa29dadc 100644 --- a/crates/gpui/examples/window_shadow.rs +++ b/crates/gpui/examples/window_shadow.rs @@ -72,8 +72,8 @@ impl Render for WindowShadow { .when(!(tiling.top || tiling.left), |div| div.rounded_tl(rounding)) .when(!tiling.top, |div| div.pt(shadow_size)) .when(!tiling.bottom, |div| div.pb(shadow_size)) - .when(!tiling.left, |div| div.pl(shadow_size)) - .when(!tiling.right, |div| div.pr(shadow_size)) + .when(!tiling.left, |div| div.pl(shadow_size - border_size)) + .when(!tiling.right, |div| div.pr(shadow_size - border_size)) .on_mouse_move(|_e, cx| cx.refresh()) .on_mouse_down(MouseButton::Left, move |e, cx| { let size = cx.window_bounds().get_bounds().size; ``` But that makes it look weird on Wayland, so I didn't do it. I think it's fine for now. Chromium looks bad and has a gap, so we're already better. ## Before   ## After   Release Notes: - N/A
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
You can download Zed today for macOS (v10.15+).
Support for additional platforms is on our roadmap:
- Linux (tracking issue)
- Windows (tracking issue)
- Web (tracking issue)
For macOS users, you can also install Zed using Homebrew:
brew install --cask zed
Alternatively, to install the Preview release:
brew install --cask zed@preview
Developing Zed
- Building Zed for macOS
- Building Zed for Linux
- Building Zed for Windows
- Running Collaboration Locally
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Description
GPUI – Community Edition maintained by Oak Team
https://gpui-ce.github.io/
257 MiB
Languages
Rust
95.5%
WGSL
1.2%
Metal
1.1%
HLSL
1.1%
Python
0.7%
Other
0.3%