Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 tasks done
alissonlauffer opened this issue Mar 6, 2022 · 5 comments · Fixed by #34955
Closed
3 tasks done

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

alissonlauffer opened this issue Mar 6, 2022 · 5 comments · Fixed by #34955

Comments

@alissonlauffer
Copy link

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

@kris7t
Copy link

kris7t commented 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
Copy link

enx1998 commented Apr 2, 2022

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

@enx1998
Copy link

enx1998 commented 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
Copy link

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

@DeedleFake
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants