Skip to content

root: Add bordered option for layer-shell fullscreen windows#2466

Merged
huacnlee merged 2 commits into
longbridge:mainfrom
gaoyia:patch-2
Jun 15, 2026
Merged

root: Add bordered option for layer-shell fullscreen windows#2466
huacnlee merged 2 commits into
longbridge:mainfrom
gaoyia:patch-2

Conversation

@gaoyia

@gaoyia gaoyia commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Add Root::borderless() so that layer-shell fullscreen surfaces (greeter, lock screen, screensaver, panel taskbar, etc.) can skip the Linux CSD window_border wrapper, which otherwise paints an unwanted border and shadow around an edge-to-edge surface.

When borderless is set, Root::render returns the inner content directly instead of wrapping it in window_border(). The default is false, so existing behavior is unchanged.

Description

On Linux, Root::render always wraps its content in window_border() to draw client-side decoration borders and shadows. For layer-shell fullscreen surfaces (greeters, lock screens, screensavers, panels, etc.) this wrapper is undesirable: such surfaces are edge-to-edge and should not have a border or drop shadow around them.

This PR adds an opt-in Root::borderless(bool) builder method backed by a borderless: bool field (default false). When borderless is true, Root::render returns the inner content element directly; otherwise it keeps wrapping the content in window_border().shadow_size(...) exactly as before. Both branches end with .into_any_element() so the return type is unified.

Because the default is false, all existing windows are unaffected.

Break Changes

None.

How to Test

  • cargo build -p gpui-component
  • On Linux with client-side decorations, set Root::borderless(true) on a layer-shell fullscreen surface and confirm the border and shadow are no longer drawn around it.
  • Confirm that a default Root (without borderless, or borderless(false)) still renders the usual border and shadow.

Checklist

  • I have read the CONTRIBUTING document and followed the guidelines.
  • Reviewed the changes in this PR and confirmed AI generated code (If any) is accurate.
  • Passed cargo run for story tests related to the changes.
  • Tested macOS, Windows and Linux platforms performance (if the change is platform-specific)

gaoyia and others added 2 commits June 14, 2026 19:13
Add `Root::borderless()` so that layer-shell fullscreen surfaces
(greeter, lock screen, screensaver, panel taskbar, etc.) can skip the
Linux CSD `window_border` wrapper, which otherwise paints an unwanted
border and shadow around an edge-to-edge surface.

When `borderless` is set, `Root::render` returns the inner content
directly instead of wrapping it in `window_border()`.
@huacnlee huacnlee changed the title feat(root): add borderless option for layer-shell fullscreen windows feat(root): add bordered option for layer-shell fullscreen windows Jun 15, 2026
@huacnlee huacnlee changed the title feat(root): add bordered option for layer-shell fullscreen windows root: Add bordered option for layer-shell fullscreen windows Jun 15, 2026
@huacnlee huacnlee merged commit 3229ac9 into longbridge:main Jun 15, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants