Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
iced-borderless-window-resize-handle-widget
Invisible edge & corner resize handles for borderless iced windows.
Setting decorations: false in iced removes the OS window frame — including its native resize borders, which makes frameless windows impossible to resize with the mouse. This crate restores them with a single lightweight overlay widget.
Pressing a handle hands the drag to the operating system's own resize machinery via drag_resize, so resizing looks, feels, and behaves natively:
| Platform | Mechanism |
|---|---|
| Windows | Native size loop (WM_NCLBUTTONDOWN + HT* hit-test codes). No WM_NCHITTEST/WS_THICKFRAME hacks, so window snapping is untouched. The resize cursor is also kept visible for the whole drag (a Windows modal-loop quirk — see the crate docs). |
| Linux (X11) | _NET_WM_MOVERESIZE — the window manager drives the resize. |
| Linux (Wayland) | xdg_toplevel.resize — the compositor drives the resize. |
| macOS | Inert. winit borderless windows already keep NSWindowStyleMask::Resizable, so macOS edge-resizes them natively. |
The widget draws nothing and keeps no state — it only watches the borders of its layout bounds, shows the native resize cursors on hover, and captures clicks within its zones.
Installation
[]
= "0.14" # any feature set works — the widget is renderer-agnostic
= "0.1"
The widget only needs iced's advanced feature (which many apps already enable) and forces no renderer or executor choices on you. Your app's binary keeps exactly the feature footprint you configured.
Usage
Layer the handles on top of your UI in a stack and forward the message to this crate's drag_resize (a drop-in replacement for iced::window::drag_resize that also keeps the native resize cursor visible during the whole drag on Windows):
use stack;
use window;
use ;
iced has no window::Id::MAIN; capture the id of your main window once at boot:
If your message enum implements From<window::Direction>, you can skip the closure:
// later, in `view`:
stack!
Or wrap any element in one call:
with_resize_handles
Options
new
.gutter // edge zone thickness (logical px, default 6)
.corner // corner zone size — corners take precedence (default 14)
.enabled // e.g. `.enabled(!is_maximized)` to disable while maximized
Notes
- The grab zones consume clicks in the outermost
gutterpixels of the window — just like the invisible border of a native frame. Don't put interactive widgets flush against the window edges. - Resizing a maximized window is ignored by the OS; gate the handles with
.enabled(...)if you prefer. - In multi-window apps, pass each window's
window::Idinto the message closure.
Run the demo with:
cargo run --example basic