Skip to content

[Bug]: Window has borders while maximized in Wayland #33161

Closed

Description

@alissonlauffer

Preflight Checklist

Electron Version

17.1.0 and 18.0.0-alpha.5

What operating system are you using?

Other Linux

Operating System Version

Arch Linux

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

The window should have no borders when maximized.

Actual Behavior

Window has borders when maximized (at least in GNOME, I have not tested in other interfaces/window managers).

Testcase Gist URL

No response

Additional Information

To reproduce:

  • Use a Wayland environment.
  • Start the Electron demo app with the flags: --enable-features=WaylandWindowDecorations --ozone-platform=wayland.
  • Maximize the window.
  • See that the window isn't really maximized and there are still borders.

Some notes:

  • The issue is not reproducible in Chromium 99.0.4844.51 with the same start flags, so that's probably not a bug in the window manager.
  • When removing the WaylandWindowDecorations feature flag, window maximizes correctly under Wayland (though there are no window decorations, so I have to maximize window using keyboard).
  • Maybe CC fix: Add support for Wayland window decorations #29618 author?

Screenshot

Activity

  1. kris7t commented on Mar 31, 2022

    @kris7t

    The same problem also appears in weston, the wayland compositor reference implementation (because it also doesn't support server-side decorations).

    However, electron works correctly in compositors with server-side decorations (e.g., KDE, sway), because the client-side decorations (that fail to detect maximized state) are disabled there as per #29618 (comment)

  2. enx1998 commented on Apr 2, 2022

    @enx1998

    I have this problem too, also enabling CSD with --enable-features=WaylandWindowDecorations option with Gnome 41.

    ./electron --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WaylandWindowDecorations
    immagine

  3. enx1998 commented on May 12, 2022

    @enx1998

    Hi all,
    is there any progress on this issue? Actually with gnome (at least 41 and 42) and wayland session, CSD is unusable and without CSD any electron based applications doesn't have window borders and mouse cursor has wrong dimension, sometimes too small, sometimes too large.

    Thanks for your work,
    ENx

  4. DiegoMagdaleno commented on Jun 8, 2022

    @DiegoMagdaleno

    I have this issue too on GNOME 42, is there any fix in progress?

  5. DeedleFake commented on Jun 8, 2022

    @DeedleFake

    I have recently begun writing my own Wayland compositor for fun and, having now become significantly more familiar with the way the system works, I can say pretty confidently that this is a bug on Electron's part. The compositor can tell a client that it's now maximized, and it's the client's responsibility to update its decorations to match that state. Electron is not doing that, resulting in it simply being resized into a 'maximized' area by the compositor without removing the shadow, which is technically part of the decorations.

  6. added a commit that references this issue on Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions