Skip to content

Linux: frameless fullscreen/kiosk BrowserWindow with resizable: false overflows the display and clips right/bottom edges #56010

Open

Description

@pandrese-zoetis

Preflight Checklist

Electron Version

45.4.1

What operating system(s) are you using?

Ubuntu, Other Linux

Operating System Version

Debian 12 / Ubuntu 26.04 (GNOME / Mutter, reproduces on both X11/Xwayland and Wayland)

What arch are you using?

x64

Last Known Working Electron version

42.11.18

Does the issue also appear in Chromium / Google Chrome?

No

Expected Behavior

A frameless fullscreen (or kiosk) BrowserWindow configured with resizable: false and sized to screen.getPrimaryDisplay().bounds (e.g. 1920x1080) should match the display size (window.innerWidth === 1920, window.innerHeight === 1080) with all four edges of the page visible on screen.

Actual Behavior

On Linux under GNOME / Mutter, the fullscreen (or kiosk) window renders larger than the monitor, cutting off the right and bottom edges of the page (the right and bottom crimson borders in the Fiddle are off-screen):

  • Under X11 / Xwayland (1920x1080 display): win.getBounds() and window.innerWidth x window.innerHeight report 1952 x 1122 (+32x42 px larger than the display).
  • Under native Wayland (--ozone-platform=wayland, 1920x1080 display): win.getBounds() and window.innerWidth x window.innerHeight report 1984 x 1164 with fullscreen: true (+64x84 px larger than the display) or 1952 x 1122 with kiosk: true (+32x42 px).

Omitting resizable: false restores the expected 1920 x 1080 fullscreen size. Setting hasShadow: false while keeping resizable: false still overflows to 1940 x 1100 (+20x20 px).

Testcase Gist URL

https://gist.github.com/5851500ec11533e18bb2f774a9962282

Additional Information

Workaround for affected apps: omit resizable: false (and minWidth/minHeight) while the frameless window is in fullscreen/kiosk mode.

In-depth investigation

  1. In Electron 43+ (refactor: replace OpaqueFrameView with ElectronFrameViewLinux #51161), ElectronFrameViewLinux + ElectronFrameViewLayoutLinux replaced OpaqueFrameView / LinuxFrameLayout (removing LinuxFrameLayout::Create's if (x11_util::IsX11()) guard). On composited WMs supporting _GTK_FRAME_EXTENTS (such as Mutter/Xwayland) as well as Wayland, frameless windows now have non-zero GetRestoredFrameBorderInsets() (TLBR(10, 16, 32, 16) = 32x42 with default shadows, or TLBR(10, 10, 10, 10) = 20x20 when hasShadow: false on setups with client-side shadow support).
  2. NativeWindowViews::SetResizable(false) locks min_size = max_size = GetSize() (1920x1080).
  3. ElectronDesktopWindowTreeHostLinux::GetMinimumSizeForWindow() and GetMaximumSizeForWindow() (fix: correct window sizing on Linux when constraints on resizability are enforced #49903, shell/browser/ui/electron_desktop_window_tree_host_linux.cc) unconditionally inflate min_size and max_size by GetRestoredFrameBorderInsets(), even when !IsShowingFrame(window_state) (fullscreen/maximized):
    • Unlike CalculateInsetsInDIP(window_state) immediately above it (which returns gfx::Insets() for kFullScreen/kMaximized), GetMinimumSizeForWindow() still adds 32x42, producing 1952x1122.
    • On X11, X11Window::UpdateMinAndMaxSize() writes GetMinimumSizeForWindow() directly into WM_NORMAL_HINTS (PMinSize = PMaxSize = 1952x1122), while X11Window::SetFullscreen(true) -> UpdateDecorationInsets() deletes _GTK_FRAME_EXTENTS because CalculateInsetsInDIP(kFullScreen) is empty.
    • On Wayland, WaylandToplevelWindow::SetSizeConstraints() subtracts CalculateInsetsInDIP(kFullScreen) (0x0) from GetMinimumSizeForWindow() (1952x1122), sending xdg_toplevel.set_min_size(1952, 1122). (With fullscreen: true + resizable: false in InitFromOptions, SetFullScreen(true) runs before SetResizable(false) and inflates it twice to 1984x1164.)
  4. In GNOME Mutter (src/core/constraints.c), PRIORITY_SIZE_HINTS_LIMITS (3) has higher priority than PRIORITY_FULLSCREEN (2). Because min_size (1952x1122) exceeds the 1920x1080 monitor with zero frame extents, constrain_fullscreen() bails out (too_big) and constrain_size_limits() clamps the fullscreen surface to 1952x1122, while Chromium lays out WebContents across the full 1952x1122 because widget()->IsFullscreen() makes GetFrameBorderInsets() empty.

Activity

  1. added
    has-repro-gist
    on Nov 23, 2026
  2. moved this to 👀 Unsorted Items in 45-x-yon Nov 23, 2026
  3. moved this from 👀 Unsorted Items to 👍 Does Not Block Stable in 45-x-yon Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    45-x-ybug 🪲has-repro-gistplatform/linux

    Type

    Projects

    • Status
      👍 Does Not Block Stable

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions