electron: [Bug]: Window CSD borders at the wrong position on ozone-wayland
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- 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
31.0.0
What operating system(s) are you using?
Other Linux
Operating System Version
Arch Linux, rolling
What arch are you using?
x64
Last Known Working Electron version
30
Expected Behavior
Actual Behavior
https://github.com/user-attachments/assets/f5e2c36f-2df3-44b4-a38e-1cdc593d1ad7
Testcase Gist URL
No response
Additional Information
Both test cases are run with:
--ozone-platform-hint=auto on GNOME wayland as electron only shows CSD titlebar in GNOME Wayland or Weston compositor. To notice the wrong border either install the rounded-window-corner-reloaded gnome extension and enable outline, or try to drag window titlebar to the top and see where it stops as per video.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 5
- Comments: 19 (4 by maintainers)
Did some digging about the resize bug #44543 - This may also be caused by #42681 and #41769
I’ve noticed two main issues here:
It’s possible these could be linked to the same root cause, but I figured it’s worth pointing them out separately. After retesting, it looks like the CSD border problem is fixed in v33, but now there’s a new bug where the client window cannot be resized.
I’ve attached an image of the two builds as comparison to illustrate that the CSD border issue is no longer inset, and v33 displays correctly without an inset. However, it now lacks window resizing controls at the edges when hovering the mouse over them.
Quick note: the CSD border issue stands out more if you’re using a rounded window extension on Gnome since it highlights the edge. Without it, the issue is less obvious but still there, just without the shader effect drawing attention to it.
Both issues exist only on the Ozone Wayland backend, X11 is fine.
Image attached (Left v31, Right v33)
I’m not sure if I’m experiencing the same issue, but many Electron apps cannot be resized at all (this includes Visual Studio Code 1.95, Signal, and Discord). I don’t get any window resizing borders at all. Now it seems that this bug was introduced in a recent Electron release, as Visual Studio Code 1.94.2 is still working.
Here are the versions for 1.95 (not resizeable):
And here for 1.94 (resizeable):
I’m running Arch Linux on GNOME/Wayland (fractional scaling enabled). Resizing worked up until (and including) Electron 31, it doesn’t work in Electron 32 and 33.
Thanks Shelley! This issue only occurred pre https://github.com/electron/electron/pull/42746, which i describe in my bisect on the resize issue https://github.com/electron/electron/issues/44543#issuecomment-2599659491
Testing your PR artifact, it does indeed fix the resize issue on Wayland, and the CSD issue described here hasn’t made a comeback so I would say it’s no longer an issue.
@EmptyVisual oops sorry for delay! what you’re saying would make this the offending diff: https://github.com/electron/electron/compare/v31.0.0-alpha.5...v31.0.0-beta.1 - i agree with you that it’s likely https://github.com/electron/electron/commit/dff980c9c20da444fb853b6983eb75d48714b486! been a bit thinly spread but i can try to refocus on this 😃