You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Window has borders while maximized in Wayland #33161
I agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for a bug report that matches the one I want to file, without success.
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).
Reacted by Valentin Richard, DeedleFake, Kristóf Marussy, parcelcat, Mario Marinero, Sayan Paul, Marek Rusinowski, Max Harmathy, Tim Klocke, Shrugal and 16 more
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)
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.
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.
Reacted by Max Harmathy, Mario Marinero, Marcus Behrendt, skoruppa, Kai Mast, Ievgen Popovych, Kolja, Zander, Dustin Speckhals, Tau Gärtli and 3 more
Activity
kris7t commentedon Mar 31, 2022
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)
enx1998 commentedon Apr 2, 2022
I have this problem too, also enabling CSD with
--enable-features=WaylandWindowDecorationsoption with Gnome 41../electron --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WaylandWindowDecorationsenx1998 commentedon May 12, 2022
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
DiegoMagdaleno commentedon Jun 8, 2022
I have this issue too on GNOME 42, is there any fix in progress?
DeedleFake commentedon Jun 8, 2022
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.
switch to x11 by default